1 node.install node_update_1008()

Create the view replacement for admin/content/node.

Related topics

File

core/modules/node/node.install, line 526
Install, update and uninstall functions for the node module.

Code

function node_update_1008() {
  $data = array(
    'name' => 'node_admin_content',
    'description' => 'Find and manage content.',
    'module' => 'node',
    'storage' => 4,
    'tag' => 'default',
    'disabled' => FALSE,
    'base_table' => 'node',
    'human_name' => 'Admin Content',
    'core' => '1.0',
    'display' => array(
      'default' => array(
        'display_title' => 'Default',
        'display_plugin' => 'default',
        'display_options' => array(
          'query' => array(
            'type' => 'views_query',
            'options' => array(),
          ),
          'access' => array(
            'type' => 'perm',
            'perm' => 'access content overview',
          ),
          'cache' => array(
            'type' => 'none',
          ),
          'exposed_form' => array(
            'type' => 'basic',
            'options' => array(
              'submit_button' => 'Filter',
              'reset_button' => 0,
              'reset_button_label' => 'Reset',
              'exposed_sorts_label' => 'Sort by',
              'expose_sort_order' => 1,
              'sort_asc_label' => 'Asc',
              'sort_desc_label' => 'Desc',
              'autosubmit' => 0,
              'autosubmit_hide' => 1,
            ),
          ),
          'pager' => array(
            'type' => 'full',
            'options' => array(
              'items_per_page' => '50',
              'offset' => '0',
              'id' => '0',
              'total_pages' => '',
              'quantity' => '9',
              'tags' => array(
                'first' => '« first',
                'previous' => '‹ previous',
                'next' => 'next ›',
                'last' => 'last »',
              ),
              'expose' => array(
                'items_per_page' => 0,
                'items_per_page_label' => 'Items per page',
                'items_per_page_options' => '5, 10, 20, 40, 60',
                'items_per_page_options_all' => 0,
                'items_per_page_options_all_label' => '- All -',
                'offset' => 0,
                'offset_label' => 'Offset',
              ),
            ),
          ),
          'style_plugin' => 'table',
          'row_plugin' => 'fields',
          'fields' => array(
            'bulk_form' => array(
              'id' => 'bulk_form',
              'table' => 'node',
              'field' => 'bulk_form',
              'relationship' => 'none',
              'group_type' => 'group',
              'ui_name' => '',
              'label' => '',
              'exclude' => 0,
              'element_type' => '',
              'element_class' => '',
              'element_label_type' => '',
              'element_label_class' => '',
              'element_label_colon' => FALSE,
              'element_wrapper_type' => '',
              'element_wrapper_class' => '',
              'element_default_classes' => 0,
              'empty' => '',
              'hide_empty' => 0,
              'empty_zero' => 0,
              'hide_alter_empty' => 1,
              'include_exclude' => 'exclude',
              'selected_actions' => array(),
            ),
            'title' => array(
              'id' => 'title',
              'table' => 'node',
              'field' => 'title',
              'hide_empty' => 0,
              'empty_zero' => 0,
              'link_to_node' => 1,
            ),
            'type' => array(
              'id' => 'type',
              'table' => 'node',
              'field' => 'type',
              'relationship' => 'none',
              'group_type' => 'group',
              'ui_name' => '',
              'label' => 'Content type',
              'exclude' => 0,
              'element_type' => '',
              'element_class' => '',
              'element_label_type' => '',
              'element_label_class' => 'priority-medium',
              'element_label_colon' => 0,
              'element_wrapper_type' => '',
              'element_wrapper_class' => '',
              'element_default_classes' => 0,
              'empty' => '',
              'hide_empty' => 0,
              'empty_zero' => 0,
              'hide_alter_empty' => 1,
              'link_to_node' => 0,
              'machine_name' => 0,
            ),
            'name' => array(
              'id' => 'name',
              'table' => 'users',
              'field' => 'name',
              'relationship' => 'uid',
              'group_type' => 'group',
              'ui_name' => '',
              'label' => 'Name',
              'exclude' => 0,
              'element_type' => '',
              'element_class' => '',
              'element_label_type' => '',
              'element_label_class' => 'priority-low',
              'element_label_colon' => 0,
              'element_wrapper_type' => '',
              'element_wrapper_class' => '',
              'element_default_classes' => 0,
              'empty' => '',
              'hide_empty' => 0,
              'empty_zero' => 0,
              'hide_alter_empty' => 1,
              'link_to_user' => 1,
              'overwrite_anonymous' => 0,
              'anonymous_text' => '',
              'format_username' => 1,
            ),
            'status' => array(
              'id' => 'status',
              'table' => 'node',
              'field' => 'status',
              'relationship' => 'none',
              'group_type' => 'group',
              'ui_name' => '',
              'label' => 'Status',
              'exclude' => 0,
              'element_type' => '',
              'element_class' => '',
              'element_label_type' => '',
              'element_label_class' => '',
              'element_label_colon' => 0,
              'element_wrapper_type' => '',
              'element_wrapper_class' => '',
              'element_default_classes' => 0,
              'empty' => '',
              'hide_empty' => 0,
              'empty_zero' => 0,
              'hide_alter_empty' => 1,
              'type' => 'published-notpublished',
              'type_custom_true' => '',
              'type_custom_false' => '',
              'not' => 0,
            ),
            'changed' => array(
              'id' => 'changed',
              'table' => 'node',
              'field' => 'changed',
              'relationship' => 'none',
              'group_type' => 'group',
              'ui_name' => '',
              'label' => 'Updated date',
              'exclude' => 0,
              'element_type' => '',
              'element_class' => '',
              'element_label_type' => '',
              'element_label_class' => 'priority-low',
              'element_label_colon' => 0,
              'element_wrapper_type' => '',
              'element_wrapper_class' => '',
              'element_default_classes' => 0,
              'empty' => '',
              'hide_empty' => 0,
              'empty_zero' => 0,
              'hide_alter_empty' => 1,
              'date_format' => 'short',
              'custom_date_format' => '',
              'timezone' => '',
            ),
            'edit_node' => array(
              'id' => 'edit_node',
              'table' => 'views_entity_node',
              'field' => 'edit_node',
              'relationship' => 'none',
              'group_type' => 'group',
              'ui_name' => '',
              'label' => '',
              'exclude' => 1,
              'element_type' => '',
              'element_class' => '',
              'element_label_type' => '',
              'element_label_class' => '',
              'element_label_colon' => FALSE,
              'element_wrapper_type' => '',
              'element_wrapper_class' => '',
              'element_default_classes' => 0,
              'empty' => '',
              'hide_empty' => 0,
              'empty_zero' => 0,
              'hide_alter_empty' => 1,
              'text' => '',
            ),
            'delete_node' => array(
              'id' => 'delete_node',
              'table' => 'views_entity_node',
              'field' => 'delete_node',
              'relationship' => 'none',
              'group_type' => 'group',
              'ui_name' => '',
              'label' => '',
              'exclude' => 1,
              'element_type' => '',
              'element_class' => '',
              'element_label_type' => '',
              'element_label_class' => '',
              'element_label_colon' => FALSE,
              'element_wrapper_type' => '',
              'element_wrapper_class' => '',
              'element_default_classes' => 0,
              'empty' => '',
              'hide_empty' => 0,
              'empty_zero' => 0,
              'hide_alter_empty' => 1,
              'text' => '',
            ),
            'dropbutton' => array(
              'id' => 'dropbutton',
              'table' => 'views',
              'field' => 'dropbutton',
              'relationship' => 'none',
              'group_type' => 'group',
              'ui_name' => '',
              'label' => 'Operations',
              'exclude' => 0,
              'element_type' => '',
              'element_class' => '',
              'element_label_type' => '',
              'element_label_class' => '',
              'element_label_colon' => 0,
              'element_wrapper_type' => '',
              'element_wrapper_class' => '',
              'element_default_classes' => 0,
              'empty' => '',
              'hide_empty' => 0,
              'empty_zero' => 0,
              'hide_alter_empty' => 1,
              'fields' =>
              array(
                'edit_node' => 'edit_node',
                'delete_node' => 'delete_node',
              ),
              'destination' => 1,
            ),
          ),
          'filters' => array(
            'status' => array(
              'id' => 'status',
              'table' => 'node',
              'field' => 'status',
              'relationship' => 'none',
              'group_type' => 'group',
              'ui_name' => '',
              'operator' => '=',
              'value' => 'All',
              'group' => 1,
              'exposed' => TRUE,
              'expose' => array(
                'operator_id' => '',
                'label' => 'Published',
                'description' => '',
                'use_operator' => FALSE,
                'operator' => 'status_op',
                'identifier' => 'status',
                'required' => 0,
                'remember' => 0,
                'multiple' => FALSE,
                'remember_roles' => array(
                  'anonymous' => 0,
                  'authenticated' => 0,
                ),
              ),
              'is_grouped' => FALSE,
            ),
            'type' => array(
              'id' => 'type',
              'table' => 'node',
              'field' => 'type',
              'relationship' => 'none',
              'group_type' => 'group',
              'ui_name' => '',
              'operator' => 'in',
              'value' => array(),
              'group' => '1',
              'exposed' => TRUE,
              'expose' => array(
                'operator_id' => 'type_op',
                'label' => 'Type',
                'description' => '',
                'use_operator' => 0,
                'operator' => 'type_op',
                'identifier' => 'type',
                'required' => 0,
                'remember' => 0,
                'multiple' => 0,
                'remember_roles' => array(
                  'anonymous' => 0,
                  'authenticated' => 0,
                ),
                'reduce' => 0,
              ),
              'is_grouped' => FALSE,
            ),
            'title' => array(
              'id' => 'title',
              'table' => 'node',
              'field' => 'title',
              'relationship' => 'none',
              'group_type' => 'group',
              'ui_name' => '',
              'operator' => 'word',
              'value' => '',
              'group' => '1',
              'exposed' => TRUE,
              'expose' => array(
                'operator_id' => 'title_op',
                'label' => 'Title contains',
                'description' => '',
                'use_operator' => 0,
                'operator' => 'title_op',
                'identifier' => 'title',
                'required' => 0,
                'remember' => 0,
                'multiple' => FALSE,
                'remember_roles' => array(
                  'anonymous' => 0,
                  'authenticated' => 0,
                ),
              ),
              'is_grouped' => FALSE,
            ),
            'status_extra' => array(
              'id' => 'status_extra',
              'table' => 'node',
              'field' => 'status_extra',
              'relationship' => 'none',
              'group_type' => 'group',
              'ui_name' => '',
              'operator' => '=',
              'value' => '',
              'group' => '1',
              'exposed' => FALSE,
              'is_grouped' => FALSE,
            ),
          ),
          'sorts' => array(
            'changed' => array(
              'id' => 'changed',
              'table' => 'node',
              'field' => 'changed',
              'order' => 'DESC',
            ),
          ),
          'title' => 'Admin Content',
          'relationships' => array(
            'uid' => array(
              'id' => 'uid',
              'table' => 'node',
              'field' => 'uid',
              'relationship' => 'none',
              'group_type' => 'group',
              'ui_name' => '',
              'label' => 'author',
              'required' => 0,
            ),
          ),
          'css_class' => 'node-admin-content',
          'empty' => array(
            'area_text_custom' => array(
              'id' => 'area_text_custom',
              'table' => 'views',
              'field' => 'area_text_custom',
              'relationship' => 'none',
              'group_type' => 'group',
              'ui_name' => '',
              'label' => '',
              'empty' => TRUE,
              'content' => 'No content available.',
              'tokenize' => 0,
            ),
          ),
          'style_options' => array(
            'grouping' => array(),
            'row_class' => '',
            'default_row_class' => 1,
            'row_class_special' => 1,
            'override' => 1,
            'sticky' => 0,
            'caption' => '',
            'summary' => '',
            'columns' => array(
              'bulk_form' => 'bulk_form',
              'title' => 'title',
              'type' => 'type',
              'name' => 'name',
              'status' => 'status',
              'changed' => 'changed',
              'edit_node' => 'edit_node',
              'delete_node' => 'delete_node',
              'dropbutton' => 'dropbutton',
            ),
            'info' => array(
              'bulk_form' => array(
                'align' => '',
                'separator' => '',
                'empty_column' => 0,
              ),
              'title' => array(
                'sortable' => 1,
                'default_sort_order' => 'asc',
                'align' => '',
                'separator' => '',
                'empty_column' => 0,
              ),
              'type' => array(
                'sortable' => 1,
                'default_sort_order' => 'asc',
                'align' => '',
                'separator' => '',
                'empty_column' => 0,
              ),
              'name' => array(
                'sortable' => 1,
                'default_sort_order' => 'asc',
                'align' => '',
                'separator' => '',
                'empty_column' => 0,
              ),
              'status' => array(
                'sortable' => 1,
                'default_sort_order' => 'asc',
                'align' => '',
                'separator' => '',
                'empty_column' => 0,
              ),
              'changed' => array(
                'sortable' => 1,
                'default_sort_order' => 'desc',
                'align' => '',
                'separator' => '',
                'empty_column' => 0,
              ),
              'edit_node' => array(
                'align' => '',
                'separator' => '',
                'empty_column' => 0,
              ),
              'delete_node' => array(
                'align' => '',
                'separator' => '',
                'empty_column' => 0,
              ),
              'dropbutton' => array(
                'align' => '',
                'separator' => '',
                'empty_column' => 0,
              ),
            ),
            'default' => 'changed',
            'empty_table' => 1,
          ),
        ),
      ),
      'page' => array(
        'display_title' => 'Page',
        'display_plugin' => 'page',
        'display_options' => array(
          'query' => array(
            'type' => 'views_query',
            'options' => array(),
          ),
          'path' => 'admin/content/node',
          'menu' => array(
            'type' => 'default tab',
            'title' => 'Find content',
            'description' => '',
            'name' => 'management',
            'weight' => '-1',
            'context' => 0,
            'context_only_inline' => 0,
          ),
          'tab_options' => array(
            'type' => 'normal',
            'title' => 'Content',
            'description' => 'Find and manage content.',
            'name' => 'management',
            'weight' => '-10',
          ),
        ),
      ),
    ),
  );
  $config = config('views.view.node_admin_content');
  if ($config->isNew()) {
    $config->setData($data);
    $config->save();
  }
}