当前位置: 首页>>代码示例>>PHP>>正文


PHP ViewTestData::viewsData方法代码示例

本文整理汇总了PHP中Drupal\views\Tests\ViewTestData::viewsData方法的典型用法代码示例。如果您正苦于以下问题:PHP ViewTestData::viewsData方法的具体用法?PHP ViewTestData::viewsData怎么用?PHP ViewTestData::viewsData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Drupal\views\Tests\ViewTestData的用法示例。


在下文中一共展示了ViewTestData::viewsData方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: viewsData

 /**
  * Returns the views data definition.
  */
 protected function viewsData()
 {
     $data = ViewTestData::viewsData();
     // Tweak the views data to have a base for testing.
     unset($data['views_test_data']['id']['field']);
     unset($data['views_test_data']['name']['argument']);
     unset($data['views_test_data']['age']['filter']);
     unset($data['views_test_data']['job']['sort']);
     $data['views_test_data']['created']['area']['id'] = 'text';
     $data['views_test_data']['age']['area']['id'] = 'text';
     $data['views_test_data']['age']['area']['sub_type'] = 'header';
     $data['views_test_data']['job']['area']['id'] = 'text';
     $data['views_test_data']['job']['area']['sub_type'] = array('header', 'footer');
     // Duplicate the example views test data for different weight, different title,
     // and matching data.
     $data['views_test_data_2'] = $data['views_test_data'];
     $data['views_test_data_2']['table']['base']['weight'] = 50;
     $data['views_test_data_3'] = $data['views_test_data'];
     $data['views_test_data_3']['table']['base']['weight'] = -50;
     $data['views_test_data_4'] = $data['views_test_data'];
     $data['views_test_data_4']['table']['base']['title'] = 'A different title';
     $data['views_test_data_5'] = $data['views_test_data'];
     $data['views_test_data_5']['table']['base']['title'] = 'Z different title';
     $data['views_test_data_6'] = $data['views_test_data'];
     return $data;
 }
开发者ID:ddrozdik,项目名称:dmaps,代码行数:29,代码来源:ViewsDataTest.php

示例2: viewsData

 /**
  * Returns the views data definition.
  *
  * @return array
  */
 protected function viewsData()
 {
     $data = ViewTestData::viewsData();
     // Tweak the views data to have a base for testing
     // \Drupal\views\ViewsDataHelper::fetchFields().
     unset($data['views_test_data']['id']['field']);
     unset($data['views_test_data']['name']['argument']);
     unset($data['views_test_data']['age']['filter']);
     unset($data['views_test_data']['job']['sort']);
     $data['views_test_data']['created']['area']['id'] = 'text';
     $data['views_test_data']['age']['area']['id'] = 'text';
     $data['views_test_data']['age']['area']['sub_type'] = 'header';
     $data['views_test_data']['job']['area']['id'] = 'text';
     $data['views_test_data']['job']['area']['sub_type'] = array('header', 'footer');
     return $data;
 }
开发者ID:davidsoloman,项目名称:drupalconsole.com,代码行数:21,代码来源:ViewsDataHelperTest.php

示例3: viewsData

 /**
  * Returns the views data definition.
  */
 protected function viewsData()
 {
     return ViewTestData::viewsData();
 }
开发者ID:sojo,项目名称:d8_friendsofsilence,代码行数:7,代码来源:ViewTestBase.php


注:本文中的Drupal\views\Tests\ViewTestData::viewsData方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。