Exemple #1
0
 /**
  * Overrides \Drupal\views\Tests\ViewTestBase::viewsData().
  *
  * Adds:
  * - a relationship for the uid column.
  * - a dummy field with no help text.
  */
 protected function viewsData()
 {
     $data = parent::viewsData();
     $data['views_test_data']['uid'] = array('title' => t('UID'), 'help' => t('The test data UID'), 'relationship' => array('id' => 'standard', 'base' => 'users_field_data', 'base field' => 'uid'));
     // Create a dummy field with no help text.
     $data['views_test_data']['no_help'] = $data['views_test_data']['name'];
     $data['views_test_data']['no_help']['field']['title'] = t('No help');
     $data['views_test_data']['no_help']['field']['real field'] = 'name';
     unset($data['views_test_data']['no_help']['help']);
     return $data;
 }
Exemple #2
0
 /**
  * Overrides \Drupal\views\Tests\ViewTestBase::viewsData().
  *
  * Adds a relationship for the uid column.
  */
 protected function viewsData()
 {
     $data = parent::viewsData();
     $data['views_test_data']['uid'] = array('title' => t('UID'), 'help' => t('The test data UID'), 'relationship' => array('id' => 'standard', 'base' => 'users', 'base field' => 'uid'));
     return $data;
 }
Exemple #3
0
 /**
  * Overrides \Drupal\views\Tests\ViewTestBase::viewsData().
  */
 protected function viewsData()
 {
     $data = parent::viewsData();
     $data['views_test_data']['table']['base']['query_id'] = 'query_test';
     return $data;
 }
 /**
  * \Drupal\views\Tests\ViewTestBase::viewsData().
  */
 public function viewsData()
 {
     $data = parent::viewsData();
     $data['views_test_data']['age']['field']['id'] = 'boolean';
     return $data;
 }