當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ViewUnitTestBase::viewsData方法代碼示例

本文整理匯總了PHP中Drupal\views\Tests\ViewUnitTestBase::viewsData方法的典型用法代碼示例。如果您正苦於以下問題:PHP ViewUnitTestBase::viewsData方法的具體用法?PHP ViewUnitTestBase::viewsData怎麽用?PHP ViewUnitTestBase::viewsData使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Drupal\views\Tests\ViewUnitTestBase的用法示例。


在下文中一共展示了ViewUnitTestBase::viewsData方法的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: 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;
 }
開發者ID:nsp15,項目名稱:Drupal8,代碼行數:10,代碼來源:FieldDateTest.php

示例2: 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;
 }
開發者ID:davidsoloman,項目名稱:drupalconsole.com,代碼行數:7,代碼來源:FilterNumericTest.php

示例3: viewsData

 /**
  * {@inheritdoc}
  */
 protected function viewsData()
 {
     $data = parent::viewsData();
     $data['views_test_data']['name']['field']['id'] = 'file_extension';
     $data['views_test_data']['name']['real field'] = 'name';
     return $data;
 }
開發者ID:davidsoloman,項目名稱:drupalconsole.com,代碼行數:10,代碼來源:ExtensionViewsFieldTest.php

示例4: 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;
 }
開發者ID:davidsoloman,項目名稱:drupalconsole.com,代碼行數:10,代碼來源:SqlQueryTest.php

示例5: viewsData

 /**
  * Overrides Drupal\views\Tests\ViewTestBase::viewsData().
  */
 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;
 }
開發者ID:jeyram,項目名稱:camp-gdl,代碼行數:11,代碼來源:FieldUnitTest.php

示例6: 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;
 }
開發者ID:nstielau,項目名稱:drops-8,代碼行數:8,代碼來源:FilterStringTest.php

示例7: viewsData

 /**
  * Overrides Drupal\views\Tests\ViewTestBase::viewsData().
  */
 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;
 }
開發者ID:nstielau,項目名稱:drops-8,代碼行數:12,代碼來源:HandlerAliasTest.php

示例8: viewsData

 /**
  * Overrides \Drupal\views\Tests\ViewUnitTestBase::viewsData().
  */
 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;
 }
開發者ID:nstielau,項目名稱:drops-8,代碼行數:14,代碼來源:ArgumentDateTest.php

示例9: viewsData

 function viewsData()
 {
     $data = parent::viewsData();
     $data['views_test_data']['age']['field']['id'] = 'file_size';
     return $data;
 }
開發者ID:nsp15,項目名稱:Drupal8,代碼行數:6,代碼來源:FieldFileSizeTest.php

示例10: viewsData

 protected function viewsData()
 {
     $data = parent::viewsData();
     $data['views_test_data']['table']['base']['query_id'] = 'query_test';
     return $data;
 }
開發者ID:nsp15,項目名稱:Drupal8,代碼行數:6,代碼來源:QueryTest.php

示例11: viewsData

 /**
  * Overrides \Drupal\views\Tests\ViewTestBase::schemaDefinition().
  */
 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;
 }
開發者ID:davidsoloman,項目名稱:drupalconsole.com,代碼行數:9,代碼來源:LanguageTestBase.php

示例12: viewsData

 /**
  * {@inheritdoc}
  */
 protected function viewsData()
 {
     $views_data = parent::viewsData();
     $views_data['views_test_data']['status']['filter']['id'] = 'boolean_string';
     return $views_data;
 }
開發者ID:davidsoloman,項目名稱:drupalconsole.com,代碼行數:9,代碼來源:FilterBooleanOperatorStringTest.php

示例13: 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;
 }
開發者ID:nsp15,項目名稱:Drupal8,代碼行數:9,代碼來源:CacheTest.php


注:本文中的Drupal\views\Tests\ViewUnitTestBase::viewsData方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。