page_title.views_default.inc in Page Title 6.2
Same filename and directory in other branches
Default Page Title Views
File
page_title.views_default.incView source
<?php
/**
* @file
* Default Page Title Views
*/
/**
* Implementation hook_views_default_views().
*/
function page_title_views_default_views() {
// This lets us locally cache the result - in case the function is called twice
static $views;
if (isset($views)) {
return $views;
}
// No views cached, generate the default views array and return
$views = array();
$views += _page_title_views_default_views_list_page_titles();
return $views;
}
/**
* Local "internal" function as a wrapper aroudn the list_page_titles view
*/
function _page_title_views_default_views_list_page_titles() {
$view = new view();
$view->name = 'list_page_titles';
$view->description = 'List all Nodes with their Page Titles';
$view->tag = 'page_title';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE;
$handler = $view
->new_display('default', 'Defaults', 'default');
$handler
->override_option('fields', array(
'nid' => array(
'label' => 'Nid',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'link_to_node' => 0,
'exclude' => 0,
'id' => 'nid',
'table' => 'node',
'field' => 'nid',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'title' => array(
'label' => 'Title',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'link_to_node' => 1,
'exclude' => 0,
'id' => 'title',
'table' => 'node',
'field' => 'title',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'page_title' => array(
'label' => 'Page Title',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '<em>– none –</em>',
'hide_empty' => 0,
'empty_zero' => 0,
'link_to_node' => 0,
'use_node_title' => 0,
'exclude' => 0,
'id' => 'page_title',
'table' => 'page_title',
'field' => 'page_title',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'edit_node' => array(
'label' => 'Operations',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'text' => 'Edit',
'exclude' => 0,
'id' => 'edit_node',
'table' => 'node',
'field' => 'edit_node',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'view_node' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'text' => 'View',
'exclude' => 0,
'id' => 'view_node',
'table' => 'node',
'field' => 'view_node',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
));
$handler
->override_option('filters', array(
'status' => array(
'operator' => '=',
'value' => 'All',
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'operator' => '',
'identifier' => 'status',
'label' => 'Published',
'optional' => 1,
'remember' => 0,
),
'id' => 'status',
'table' => 'node',
'field' => 'status',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'type' => array(
'operator' => 'in',
'value' => array(),
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'type_op',
'identifier' => 'type',
'label' => 'Node Type',
'optional' => 1,
'single' => 0,
'remember' => 0,
'reduce' => 0,
),
'id' => 'type',
'table' => 'node',
'field' => 'type',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'page_title' => array(
'operator' => 'contains',
'value' => '',
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 1,
'operator' => 'page_title_op',
'identifier' => 'page_title',
'label' => 'Page Title',
'optional' => 1,
'remember' => 0,
),
'case' => 1,
'id' => 'page_title',
'table' => 'page_title',
'field' => 'page_title',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
));
$handler
->override_option('access', array(
'type' => 'perm',
'perm' => 'administer page titles',
));
$handler
->override_option('cache', array(
'type' => 'none',
));
$handler
->override_option('title', 'Page Title List');
$handler
->override_option('header', 'Listed below are all the nodes on the site with their Page Title (if set).');
$handler
->override_option('header_format', '1');
$handler
->override_option('header_empty', 0);
$handler
->override_option('empty', 'There is no content to list');
$handler
->override_option('empty_format', '1');
$handler
->override_option('style_plugin', 'table');
$handler
->override_option('style_options', array(
'grouping' => '',
'override' => 1,
'sticky' => 0,
'order' => 'asc',
'columns' => array(
'nid' => 'nid',
'title' => 'title',
'page_title' => 'page_title',
'edit_node' => 'edit_node',
'view_node' => 'edit_node',
),
'info' => array(
'nid' => array(
'sortable' => 1,
'separator' => '',
),
'title' => array(
'sortable' => 1,
'separator' => '',
),
'page_title' => array(
'sortable' => 1,
'separator' => '',
),
'edit_node' => array(
'separator' => ' | ',
),
'view_node' => array(
'separator' => '',
),
),
'default' => 'nid',
));
$handler = $view
->new_display('page', 'Page', 'page_1');
$handler
->override_option('path', 'admin/reports/page-title');
$handler
->override_option('menu', array(
'type' => 'normal',
'title' => 'Page Title List',
'description' => 'List all nodes with their Page Titles',
'weight' => '0',
'name' => 'navigation',
));
$handler
->override_option('tab_options', array(
'type' => 'none',
'title' => '',
'description' => '',
'weight' => 0,
'name' => 'navigation',
));
return array(
$view->name => $view,
);
}
Functions
Name | Description |
---|---|
page_title_views_default_views | Implementation hook_views_default_views(). |
_page_title_views_default_views_list_page_titles | Local "internal" function as a wrapper aroudn the list_page_titles view |