Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Currently we are doing this to create a new view:
$view = views_new_view();
$view->name = $form_state['values']['name'];
$view->human_name = $form_state['values']['human_name'];
$view->description = $form_state['values']['description'];
$view->tag = 'default';
$view->core = VERSION;
$view->base_table = $this->base_table;
We should pass these parameters (only ones that are needed) into a create method instead. I have also created a views_create_view wrapper function for entity_create as we currently have for views_new_view.
The patch also contains a couple of small doc amends.
Comment | File | Size | Author |
---|---|---|---|
views-wizard-create-view-cleanup.patch | 2.33 KB | damiankloip | |
Comments
Comment #1
dawehnerI totally agree that using 'default' for a tag doesn't make sense, but why remote 'core' out of that?
Comment #2
dawehnerJust clarified that core gets set by ViewStorage.
Comment #3
damiankloip CreditAttribution: damiankloip commentedComment #4
damiankloip CreditAttribution: damiankloip commentedCommitted to 8.x