本文整理汇总了PHP中Drupal\Tests\views\Kernel\ViewsKernelTestBase::viewsData方法的典型用法代码示例。如果您正苦于以下问题:PHP ViewsKernelTestBase::viewsData方法的具体用法?PHP ViewsKernelTestBase::viewsData怎么用?PHP ViewsKernelTestBase::viewsData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Drupal\Tests\views\Kernel\ViewsKernelTestBase
的用法示例。
在下文中一共展示了ViewsKernelTestBase::viewsData方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: viewsData
function viewsData()
{
$data = parent::viewsData();
$data['views_test_data']['age']['filter']['allow empty'] = TRUE;
$data['views_test_data']['id']['filter']['allow empty'] = FALSE;
return $data;
}
示例2: viewsData
/**
* {@inheritdoc}
*/
protected function viewsData()
{
$data = parent::viewsData();
$data['views_test_data']['table']['base']['access query tag'] = 'test_tag';
$data['views_test_data']['table']['base']['query metadata'] = array('key1' => 'test_metadata', 'key2' => 'test_metadata2');
return $data;
}
示例3: viewsData
/**
* {@inheritdoc}
*/
public function viewsData()
{
$data = parent::viewsData();
$data['views_test_data']['created']['field']['id'] = 'date';
$data['views_test_data']['destroyed'] = array('title' => 'Destroyed', 'help' => 'Date in future this will be destroyed.', 'field' => array('id' => 'date'), 'argument' => array('id' => 'date'), 'filter' => array('id' => 'date'), 'sort' => array('id' => 'date'));
return $data;
}
示例4: viewsData
/**
* {@inheritdoc}
*/
protected function viewsData()
{
$data = parent::viewsData();
$data['views_test_data']['job']['field']['id'] = 'test_field';
$data['views_test_data']['job']['field']['click sortable'] = FALSE;
$data['views_test_data']['id']['field']['click sortable'] = TRUE;
return $data;
}
示例5: viewsData
function viewsData()
{
$data = parent::viewsData();
$data['views_test_data']['name']['filter']['allow empty'] = TRUE;
$data['views_test_data']['job']['filter']['allow empty'] = FALSE;
$data['views_test_data']['description'] = $data['views_test_data']['name'];
return $data;
}
示例6: viewsData
/**
* {@inheritdoc}
*/
protected function viewsData()
{
$data = parent::viewsData();
// User the existing test_filter plugin.
$data['views_test_data_alias']['table']['real table'] = 'views_test_data';
$data['views_test_data_alias']['name_alias']['filter']['id'] = 'test_filter';
$data['views_test_data_alias']['name_alias']['filter']['real field'] = 'name';
return $data;
}
示例7: viewsData
/**
* {@inheritdoc}
*/
public function viewsData()
{
$data = parent::viewsData();
$date_plugins = array('date_fulldate', 'date_day', 'date_month', 'date_week', 'date_year', 'date_year_month');
foreach ($date_plugins as $plugin_id) {
$data['views_test_data'][$plugin_id] = $data['views_test_data']['created'];
$data['views_test_data'][$plugin_id]['real field'] = 'created';
$data['views_test_data'][$plugin_id]['argument']['id'] = $plugin_id;
}
return $data;
}
示例8: viewsData
function viewsData()
{
$data = parent::viewsData();
$data['views_test_data']['age']['field']['id'] = 'boolean';
return $data;
}
示例9: viewsData
protected function viewsData()
{
$data = parent::viewsData();
$data['views_test_data']['table']['base']['query_id'] = 'query_test';
return $data;
}
示例10: viewsData
/**
* {@inheritdoc}
*/
protected function viewsData()
{
$data = parent::viewsData();
$data['views_test_data']['test_cache_context'] = ['real field' => 'name', 'title' => 'Test cache context', 'filter' => ['id' => 'views_test_test_cache_context']];
return $data;
}
示例11: viewsData
/**
* {@inheritdoc}
*/
protected function viewsData()
{
$views_data = parent::viewsData();
$views_data['views_test_data']['status']['filter']['id'] = 'boolean_string';
return $views_data;
}
示例12: viewsData
/**
* {@inheritdoc}
*/
protected function viewsData()
{
$data = parent::viewsData();
$data['views_test_data']['langcode'] = array('title' => t('Langcode'), 'help' => t('Langcode'), 'field' => array('id' => 'language'), 'argument' => array('id' => 'language'), 'filter' => array('id' => 'language'));
return $data;
}