• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP views\EntityViewsData类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: getViewsData

 /**
  * {@inheritdoc}
  */
 public function getViewsData()
 {
     $data = parent::getViewsData();
     $data['block_content_field_data']['id']['field']['id'] = 'field';
     $data['block_content_field_data']['info']['field']['id'] = 'field';
     $data['block_content_field_data']['info']['field']['link_to_entity default'] = TRUE;
     $data['block_content_field_data']['type']['field']['id'] = 'field';
     // @todo Figure out the way to integrate this automatic in
     //   content_translation https://www.drupal.org/node/2410261.
     if ($this->moduleHandler->moduleExists('content_translation')) {
         $data['block_content']['translation_link'] = array('title' => $this->t('Translation link'), 'help' => $this->t('Provide a link to the translations overview for custom blocks.'), 'field' => array('id' => 'content_translation_link'));
     }
     // Advertise this table as a possible base table.
     $data['block_content_revision']['table']['base']['help'] = $this->t('Block Content revision is a history of changes to block content.');
     $data['block_content_revision']['table']['base']['defaults']['title'] = 'info';
     // @todo EntityViewsData should add these relationships by default.
     //   https://www.drupal.org/node/2410275
     $data['block_content_revision']['id']['relationship']['id'] = 'standard';
     $data['block_content_revision']['id']['relationship']['base'] = 'block_content';
     $data['block_content_revision']['id']['relationship']['base field'] = 'id';
     $data['block_content_revision']['id']['relationship']['title'] = $this->t('Block Content');
     $data['block_content_revision']['id']['relationship']['label'] = $this->t('Get the actual block content from a block content revision.');
     $data['block_content_revision']['revision_id']['relationship']['id'] = 'standard';
     $data['block_content_revision']['revision_id']['relationship']['base'] = 'block_content';
     $data['block_content_revision']['revision_id']['relationship']['base field'] = 'revision_id';
     $data['block_content_revision']['revision_id']['relationship']['title'] = $this->t('Block Content');
     $data['block_content_revision']['revision_id']['relationship']['label'] = $this->t('Get the actual block content from a block content revision.');
     $data['block_content_revision']['revision_log']['field']['id'] = 'xss';
     return $data;
 }
开发者ID:Nikola-xiii,项目名称:d8intranet,代码行数:33,代码来源:BlockContentViewsData.php


示例2: getViewsData

 /**
  * {@inheritdoc}
  */
 public function getViewsData()
 {
     $data = parent::getViewsData();
     $data['block_content_field_data']['id']['field']['id'] = 'field';
     $data['block_content_field_data']['info']['field']['id'] = 'field';
     $data['block_content_field_data']['info']['field']['link_to_entity default'] = TRUE;
     $data['block_content_field_data']['type']['field']['id'] = 'field';
     $data['block_content']['block_content_listing_empty'] = array('title' => $this->t('Empty block library behavior'), 'help' => $this->t('Provides a link to add a new block.'), 'area' => array('id' => 'block_content_listing_empty'));
     // Advertise this table as a possible base table.
     $data['block_content_field_revision']['table']['base']['help'] = $this->t('Block Content revision is a history of changes to block content.');
     $data['block_content_field_revision']['table']['base']['defaults']['title'] = 'info';
     // @todo EntityViewsData should add these relationships by default.
     //   https://www.drupal.org/node/2410275
     $data['block_content_field_revision']['id']['relationship']['id'] = 'standard';
     $data['block_content_field_revision']['id']['relationship']['base'] = 'block_content_field_data';
     $data['block_content_field_revision']['id']['relationship']['base field'] = 'id';
     $data['block_content_field_revision']['id']['relationship']['title'] = $this->t('Block Content');
     $data['block_content_field_revision']['id']['relationship']['label'] = $this->t('Get the actual block content from a block content revision.');
     $data['block_content_field_revision']['revision_id']['relationship']['id'] = 'standard';
     $data['block_content_field_revision']['revision_id']['relationship']['base'] = 'block_content_field_data';
     $data['block_content_field_revision']['revision_id']['relationship']['base field'] = 'revision_id';
     $data['block_content_field_revision']['revision_id']['relationship']['title'] = $this->t('Block Content');
     $data['block_content_field_revision']['revision_id']['relationship']['label'] = $this->t('Get the actual block content from a block content revision.');
     return $data;
 }
开发者ID:eigentor,项目名称:tommiblog,代码行数:28,代码来源:BlockContentViewsData.php


示例3: getViewsData

 /**
  * @param ContentEntityTypeInterface $entity
  * @return array
  */
 public function getViewsData(ContentEntityTypeInterface $entity = NULL)
 {
     $data = parent::getViewsData();
     if ($entity) {
         // Get some info to work off.
         /** @var string $entity_table */
         $entity_table = $entity->get('base_table');
         /** @var string $entity_data_table */
         $entity_data_table = $entity->get('data_table');
         /** @var string $entity_revision_table */
         $entity_revision_table = $entity->get('revision_table');
         // Replacements for all strings.
         $replacements = ['@entity_label' => $entity->getLabel(), '!entity_id' => $entity->id()];
         if (!empty($entity_data_table)) {
             // Add the entity ID field.
             $data[$entity_data_table]['id']['field']['id'] = 'field';
             // Add entity info.
             $data[$entity_data_table]['info']['field']['id'] = 'field';
             $data[$entity_data_table]['info']['field']['link_to_entity default'] = TRUE;
             // Add the bundle (type).
             $data[$entity_data_table]['type']['field']['id'] = 'field';
         }
         if (!empty($entity_table) && !empty($entity_revision_table)) {
             // Advertise this table as a possible base table.
             $data[$entity_revision_table]['table']['base']['help'] = $this->t('@entity_label revision is a history of changes to a "!entity_id" entity.', $replacements);
             $data[$entity_revision_table]['table']['base']['defaults']['title'] = 'info';
             // @todo EntityViewsData should add these relationships by default.
             //   https://www.drupal.org/node/2410275
             $data[$entity_revision_table]['id']['relationship']['id'] = 'standard';
             $data[$entity_revision_table]['id']['relationship']['base'] = $entity_table;
             $data[$entity_revision_table]['id']['relationship']['base field'] = 'id';
             $data[$entity_revision_table]['id']['relationship']['title'] = $this->t('@entity_label', $replacements);
             $data[$entity_revision_table]['id']['relationship']['label'] = $this->t('Get the actual @entity_label from a @entity_label revision.', $replacements);
             $data[$entity_revision_table]['revision_id']['relationship']['id'] = 'standard';
             $data[$entity_revision_table]['revision_id']['relationship']['base'] = $entity_table;
             $data[$entity_revision_table]['revision_id']['relationship']['base field'] = 'revision_id';
             $data[$entity_revision_table]['revision_id']['relationship']['title'] = $this->t('@entity_label', $replacements);
             $data[$entity_revision_table]['revision_id']['relationship']['label'] = $this->t('Get the actual @entity_label from a @entity_label revision.', $replacements);
         }
     }
     return $data;
 }
开发者ID:heddn,项目名称:content_entity_base,代码行数:46,代码来源:EntityBaseViewsData.php


示例4: getViewsData

 /**
  * {@inheritdoc}
  */
 public function getViewsData()
 {
     $data = parent::getViewsData();
     $data['media_field_data']['table']['wizard_id'] = 'media';
     $data['media_field_revision']['table']['wizard_id'] = 'media_revision';
     return $data;
 }
开发者ID:sedurzu,项目名称:ildeposito8,代码行数:10,代码来源:MediaViewsData.php


示例5: getViewsData

 /**
  * {@inheritdoc}
  */
 public function getViewsData()
 {
     $data = parent::getViewsData();
     $data['card_base']['card_base_bulk_form'] = array('title' => t('Bulk update'), 'help' => t('Add a form element that lets you run operations on multiple card bases.'), 'field' => array('id' => 'card_base_bulk_form'));
     $data['card_base']['card_base_instance_count'] = array('title' => t('Count instances'), 'help' => t('Displays a count of card instances of this card base.'), 'field' => array('id' => 'card_base_instance_count'));
     return $data;
 }
开发者ID:mangyfox,项目名称:magic-v2,代码行数:10,代码来源:CardBaseViewsData.php


示例6: getViewsData

 /**
  * {@inheritdoc}
  */
 public function getViewsData()
 {
     $data = parent::getViewsData();
     // @todo D8-port: Add some data from D7 function workflow_views_views_data_alter() ??
     // @see http://cgit.drupalcode.org/workflow/tree/workflow_views/workflow_views.views.inc
     return $data;
 }
开发者ID:sedurzu,项目名称:ildeposito8,代码行数:10,代码来源:WorkflowScheduledTransitionViewsData.php


示例7: getViewsData

 /**
  * {@inheritdoc}
  */
 public function getViewsData()
 {
     $data = parent::getViewsData();
     $data['tmgmt_local_task_item']['status'] = array('title' => t('Status'), 'help' => t('Display the status of the task item.'), 'field' => array('id' => 'tmgmt_local_task_item_status'));
     $data['tmgmt_local_task_item']['progress'] = array('title' => t('Progress'), 'help' => t('Displays the progress of a task item.'), 'real field' => 'tltiid', 'field' => array('id' => 'tmgmt_local_progress'));
     $data['tmgmt_local_task_item']['word_count'] = array('title' => t('Words'), 'help' => t('Displays the word count of a task item.'), 'real field' => 'tltiid', 'field' => array('id' => 'tmgmt_local_wordcount'));
     return $data;
 }
开发者ID:andrewl,项目名称:andrewlnet,代码行数:11,代码来源:LocalTaskItemViewsData.php


示例8: getViewsData

  /**
   * {@inheritdoc}
   */
  public function getViewsData() {
    $data = parent::getViewsData();

    $data['fillpdf_fields']['table']['group'] = $data['fillpdf_fields']['table']['base']['title'] = t('FillPDF form fields');

    $data['fillpdf_fields']['table']['base']['help'] = t('FillPDF form fields represent fields in an uploaded FillPDF PDF.');

    return $data;
  }
开发者ID:AshishNaik021,项目名称:iimisac-d8,代码行数:12,代码来源:FillPdfFormFieldViewsData.php


示例9: getViewsData

 /**
  * {@inheritdoc}
  */
 public function getViewsData()
 {
     $views_data = parent::getViewsData();
     if ($this->entityType->id() != 'entity_test') {
         return $views_data;
     }
     $views_data = NestedArray::mergeDeep($views_data, \Drupal::state()->get('entity_test.views_data', []));
     return $views_data;
 }
开发者ID:ddrozdik,项目名称:dmaps,代码行数:12,代码来源:EntityTestViewsData.php


示例10: getViewsData

 /**
  * {@inheritdoc}
  */
 public function getViewsData()
 {
     $data = parent::getViewsData();
     $data['users_field_data']['table']['base']['help'] = t('Users who have created accounts on your site.');
     $data['users_field_data']['table']['base']['access query tag'] = 'user_access';
     $data['users_field_data']['table']['wizard_id'] = 'user';
     $data['users_field_data']['uid']['field']['id'] = 'user';
     $data['users_field_data']['uid']['argument']['id'] = 'user_uid';
     $data['users_field_data']['uid']['argument'] += array('name table' => 'users_field_data', 'name field' => 'name', 'empty field name' => \Drupal::config('user.settings')->get('anonymous'));
     $data['users_field_data']['uid']['filter']['id'] = 'user_name';
     $data['users_field_data']['uid']['filter']['title'] = t('Name');
     $data['users_field_data']['uid']['relationship'] = array('title' => t('Content authored'), 'help' => t('Relate content to the user who created it. This relationship will create one record for each content item created by the user.'), 'id' => 'standard', 'base' => 'node_field_data', 'base field' => 'uid', 'field' => 'uid', 'label' => t('nodes'));
     $data['users_field_data']['uid_raw'] = array('help' => t('The raw numeric user ID.'), 'real field' => 'uid', 'filter' => array('title' => t('The user ID'), 'id' => 'numeric'));
     $data['users_field_data']['uid_representative'] = array('relationship' => array('title' => t('Representative node'), 'label' => t('Representative node'), 'help' => t('Obtains a single representative node for each user, according to a chosen sort criterion.'), 'id' => 'groupwise_max', 'relationship field' => 'uid', 'outer field' => 'users_field_data.uid', 'argument table' => 'users_field_data', 'argument field' => 'uid', 'base' => 'node_field_data', 'field' => 'nid', 'relationship' => 'node_field_data:uid'));
     $data['users']['uid_current'] = array('real field' => 'uid', 'title' => t('Current'), 'help' => t('Filter the view to the currently logged in user.'), 'filter' => array('id' => 'user_current', 'type' => 'yes-no'));
     $data['users_field_data']['name']['help'] = t('The user or author name.');
     $data['users_field_data']['name']['field']['id'] = 'user_name';
     $data['users_field_data']['name']['filter']['title'] = t('Name (raw)');
     $data['users_field_data']['name']['filter']['help'] = t('The user or author name. This filter does not check if the user exists and allows partial matching. Does not use autocomplete.');
     // Note that this field implements field level access control.
     $data['users_field_data']['mail']['help'] = t('Email address for a given user. This field is normally not shown to users, so be cautious when using it.');
     $data['users_field_data']['mail']['field']['id'] = 'user_mail';
     $data['users_field_data']['langcode']['help'] = t('Original language of the user information');
     $data['users_field_data']['langcode']['help'] = t('Language of the translation of user information');
     $data['users_field_data']['preferred_langcode']['title'] = t('Preferred language');
     $data['users_field_data']['preferred_langcode']['help'] = t('Preferred language of the user');
     $data['users_field_data']['preferred_admin_langcode']['title'] = t('Preferred admin language');
     $data['users_field_data']['preferred_admin_langcode']['help'] = t('Preferred administrative language of the user');
     $data['users']['view_user'] = array('field' => array('title' => t('Link to user'), 'help' => t('Provide a simple link to the user.'), 'id' => 'user_link', 'click sortable' => FALSE));
     $data['users_field_data']['created_fulldate'] = array('title' => t('Created date'), 'help' => t('Date in the form of CCYYMMDD.'), 'argument' => array('field' => 'created', 'id' => 'date_fulldate'));
     $data['users_field_data']['created_year_month'] = array('title' => t('Created year + month'), 'help' => t('Date in the form of YYYYMM.'), 'argument' => array('field' => 'created', 'id' => 'date_year_month'));
     $data['users_field_data']['created_year'] = array('title' => t('Created year'), 'help' => t('Date in the form of YYYY.'), 'argument' => array('field' => 'created', 'id' => 'date_year'));
     $data['users_field_data']['created_month'] = array('title' => t('Created month'), 'help' => t('Date in the form of MM (01 - 12).'), 'argument' => array('field' => 'created', 'id' => 'date_month'));
     $data['users_field_data']['created_day'] = array('title' => t('Created day'), 'help' => t('Date in the form of DD (01 - 31).'), 'argument' => array('field' => 'created', 'id' => 'date_day'));
     $data['users_field_data']['created_week'] = array('title' => t('Created week'), 'help' => t('Date in the form of WW (01 - 53).'), 'argument' => array('field' => 'created', 'id' => 'date_week'));
     $data['users_field_data']['status']['filter']['label'] = t('Active');
     $data['users_field_data']['status']['filter']['type'] = 'yes-no';
     $data['users_field_data']['changed']['title'] = t('Updated date');
     $data['users_field_data']['changed_fulldate'] = array('title' => t('Updated date'), 'help' => t('Date in the form of CCYYMMDD.'), 'argument' => array('field' => 'changed', 'id' => 'date_fulldate'));
     $data['users_field_data']['changed_year_month'] = array('title' => t('Updated year + month'), 'help' => t('Date in the form of YYYYMM.'), 'argument' => array('field' => 'changed', 'id' => 'date_year_month'));
     $data['users_field_data']['changed_year'] = array('title' => t('Updated year'), 'help' => t('Date in the form of YYYY.'), 'argument' => array('field' => 'changed', 'id' => 'date_year'));
     $data['users_field_data']['changed_month'] = array('title' => t('Updated month'), 'help' => t('Date in the form of MM (01 - 12).'), 'argument' => array('field' => 'changed', 'id' => 'date_month'));
     $data['users_field_data']['changed_day'] = array('title' => t('Updated day'), 'help' => t('Date in the form of DD (01 - 31).'), 'argument' => array('field' => 'changed', 'id' => 'date_day'));
     $data['users_field_data']['changed_week'] = array('title' => t('Updated week'), 'help' => t('Date in the form of WW (01 - 53).'), 'argument' => array('field' => 'changed', 'id' => 'date_week'));
     if (\Drupal::moduleHandler()->moduleExists('content_translation')) {
         $data['users']['translation_link'] = array('title' => t('Translation link'), 'help' => t('Provide a link to the translations overview for users.'), 'field' => array('id' => 'content_translation_link'));
     }
     $data['users']['edit_node'] = array('field' => array('title' => t('Link to edit user'), 'help' => t('Provide a simple link to edit the user.'), 'id' => 'user_link_edit', 'click sortable' => FALSE));
     $data['users']['cancel_node'] = array('field' => array('title' => t('Link to cancel user'), 'help' => t('Provide a simple link to cancel the user.'), 'id' => 'user_link_cancel', 'click sortable' => FALSE));
     $data['users']['data'] = array('title' => t('Data'), 'help' => t('Provides access to the user data service.'), 'real field' => 'uid', 'field' => array('id' => 'user_data'));
     $data['users']['user_bulk_form'] = array('title' => t('Bulk update'), 'help' => t('Add a form element that lets you run operations on multiple users.'), 'field' => array('id' => 'user_bulk_form'));
     $data['user__roles']['table']['group'] = t('User');
     $data['user__roles']['table']['join'] = array('users_field_data' => array('left_field' => 'uid', 'field' => 'entity_id'));
     $data['user__roles']['roles_target_id'] = array('title' => t('Roles'), 'help' => t('Roles that a user belongs to.'), 'field' => array('id' => 'user_roles', 'no group by' => TRUE), 'filter' => array('id' => 'user_roles', 'allow empty' => TRUE), 'argument' => array('id' => 'user__roles_target_id', 'name table' => 'role', 'name field' => 'name', 'empty field name' => t('No role'), 'zero is null' => TRUE, 'numeric' => TRUE));
     $data['user__roles']['permission'] = array('title' => t('Permission'), 'help' => t('The user permissions.'), 'field' => array('id' => 'user_permissions', 'no group by' => TRUE), 'filter' => array('id' => 'user_permissions', 'real field' => 'roles_target_id'));
     return $data;
 }
开发者ID:Nikola-xiii,项目名称:d8intranet,代码行数:60,代码来源:UserViewsData.php


示例11: getViewsData

 /**
  * {@inheritdoc}
  */
 public function getViewsData()
 {
     $data = parent::getViewsData();
     $data['simplenews_subscriber']['edit_link'] = array('field' => array('title' => $this->t('Link to edit'), 'help' => $this->t('Provide a simple link to edit the subscriber.'), 'id' => 'subscriber_link_edit'));
     $data['simplenews_subscriber']['delete_link'] = array('field' => array('title' => $this->t('Link to delete'), 'help' => $this->t('Provide a simple link to delete the subscriber.'), 'id' => 'subscriber_link_delete'));
     // @todo Username obtained through custom plugin due to core issue.
     $data['simplenews_subscriber']['user_name'] = array('real field' => 'uid', 'field' => array('title' => $this->t('Username'), 'help' => $this->t('Provide a simple link to the subscriber\'s user account .'), 'id' => 'simplenews_user_name'));
     return $data;
 }
开发者ID:aritnath1990,项目名称:simplenewslatest,代码行数:12,代码来源:SubscriberViewsData.php


示例12: getViewsData

 /**
  * {@inheritdoc}
  */
 public function getViewsData()
 {
     $data = parent::getViewsData();
     $data['tmgmt_job_item']['label'] = array('title' => 'Label', 'help' => 'Displays a label of the job item.', 'real field' => 'tjiid', 'field' => array('id' => 'tmgmt_entity_label'));
     $data['tmgmt_job_item']['progress'] = array('title' => 'Progress', 'help' => 'Displays the progress of a job item.', 'real field' => 'tjiid', 'field' => array('id' => 'tmgmt_progress'));
     $data['tmgmt_job_item']['type'] = array('title' => t('Type'), 'help' => t('Displays a type of the job item.'), 'real field' => 'tjiid', 'field' => array('id' => 'tmgmt_job_item_type'));
     $data['tmgmt_job_item']['state'] = array('title' => 'State', 'help' => 'Displays the state of the job item.', 'field' => array('id' => 'tmgmt_job_item_state'), 'filter' => array('id' => 'numeric'));
     $data['tmgmt_job_item']['footer'] = array('title' => t('Job Item Overview legend'), 'help' => t('Add job item state legends'), 'area' => array('id' => 'tmgmt_job_item_legend'));
     return $data;
 }
开发者ID:andrewl,项目名称:andrewlnet,代码行数:13,代码来源:JobItemViewsData.php


示例13: getViewsData

 /**
  * Returns the Views data for the entity.
  */
 public function getViewsData()
 {
     // Start with the Views information provided by the base class.
     $data = parent::getViewsData();
     // Define a wizard.
     $data['myentity_field_data']['table']['wizard_id'] = 'myentity';
     // You could also override labels or put in a custom field
     // or filter handler.
     return $data;
 }
开发者ID:Jamesadamar,项目名称:programmers_guide_to_drupal,代码行数:13,代码来源:MyEntityViewsData.php


示例14: getViewsData

 /**
  * {@inheritdoc}
  */
 public function getViewsData()
 {
     $data = parent::getViewsData();
     // @TODO There is no corresponding information in entity metadata.
     $data['file_managed']['table']['base']['help'] = t('Files maintained by Drupal and various modules.');
     $data['file_managed']['table']['base']['defaults']['field'] = 'filename';
     $data['file_managed']['table']['wizard_id'] = 'file_managed';
     $data['file_managed']['fid']['field']['id'] = 'file';
     $data['file_managed']['fid']['argument'] = array('id' => 'file_fid', 'name field' => 'filename', 'numeric' => TRUE);
     $data['file_managed']['fid']['relationship'] = array('title' => t('File usage'), 'help' => t('Relate file entities to their usage.'), 'id' => 'standard', 'base' => 'file_usage', 'base field' => 'fid', 'field' => 'fid', 'label' => t('File usage'));
     $data['file_managed']['filename']['field']['id'] = 'file';
     $data['file_managed']['uri']['field']['id'] = 'file_uri';
     $data['file_managed']['filemime']['field']['id'] = 'file_filemime';
     $data['file_managed']['extension'] = array('title' => t('Extension'), 'help' => t('The extension of the file.'), 'real field' => 'filename', 'field' => array('id' => 'file_extension', 'click sortable' => FALSE));
     $data['file_managed']['filesize']['field']['id'] = 'file_size';
     $data['file_managed']['status']['field']['id'] = 'file_status';
     $data['file_managed']['status']['filter']['id'] = 'file_status';
     $data['file_managed']['uid']['relationship']['title'] = t('User who uploaded');
     $data['file_managed']['uid']['relationship']['label'] = t('User who uploaded');
     $data['file_usage']['table']['group'] = t('File Usage');
     // Provide field-type-things to several base tables; on the core files table
     // ("file_managed") so that we can create relationships from files to
     // entities, and then on each core entity type base table so that we can
     // provide general relationships between entities and files.
     $data['file_usage']['table']['join'] = array('file_managed' => array('field' => 'fid', 'left_field' => 'fid'), 'node' => array('field' => 'id', 'left_field' => 'nid', 'extra' => array(array('field' => 'type', 'value' => 'node'))), 'users' => array('field' => 'id', 'left_field' => 'uid', 'extra' => array(array('field' => 'type', 'value' => 'user'))), 'comment' => array('field' => 'id', 'left_field' => 'cid', 'extra' => array(array('field' => 'type', 'value' => 'comment'))), 'taxonomy_term_data' => array('field' => 'id', 'left_field' => 'tid', 'extra' => array(array('field' => 'type', 'value' => 'taxonomy_term'))), 'taxonomy_vocabulary' => array('field' => 'id', 'left_field' => 'vid', 'extra' => array(array('field' => 'type', 'value' => 'taxonomy_vocabulary'))));
     // Provide a relationship between the files table and each entity type,
     // and between each entity type and the files table. Entity->file
     // relationships are type-restricted in the joins declared above, and
     // file->entity relationships are type-restricted in the relationship
     // declarations below.
     // Describes relationships between files and nodes.
     $data['file_usage']['file_to_node'] = array('title' => t('Content'), 'help' => t('Content that is associated with this file, usually because this file is in a field on the content.'), 'skip base' => array('node', 'node_field_revision', 'users', 'comment', 'taxonomy_term_data', 'taxonomy_vocabulary'), 'real field' => 'id', 'relationship' => array('title' => t('Content'), 'label' => t('Content'), 'base' => 'node', 'base field' => 'nid', 'relationship field' => 'id', 'extra' => array(array('table' => 'file_usage', 'field' => 'type', 'operator' => '=', 'value' => 'node'))));
     $data['file_usage']['node_to_file'] = array('title' => t('File'), 'help' => t('A file that is associated with this node, usually because it is in a field on the node.'), 'skip base' => array('file_managed', 'users', 'comment', 'taxonomy_term_data', 'taxonomy_vocabulary'), 'real field' => 'fid', 'relationship' => array('title' => t('File'), 'label' => t('File'), 'base' => 'file_managed', 'base field' => 'fid', 'relationship field' => 'fid'));
     // Describes relationships between files and users.
     $data['file_usage']['file_to_user'] = array('title' => t('User'), 'help' => t('A user that is associated with this file, usually because this file is in a field on the user.'), 'skip base' => array('node', 'node_field_revision', 'users', 'comment', 'taxonomy_term_data', 'taxonomy_vocabulary'), 'real field' => 'id', 'relationship' => array('title' => t('User'), 'label' => t('User'), 'base' => 'users', 'base field' => 'uid', 'relationship field' => 'id', 'extra' => array(array('table' => 'file_usage', 'field' => 'type', 'operator' => '=', 'value' => 'user'))));
     $data['file_usage']['user_to_file'] = array('title' => t('File'), 'help' => t('A file that is associated with this user, usually because it is in a field on the user.'), 'skip base' => array('file_managed', 'node', 'node_field_revision', 'comment', 'taxonomy_term_data', 'taxonomy_vocabulary'), 'real field' => 'fid', 'relationship' => array('title' => t('File'), 'label' => t('File'), 'base' => 'file_managed', 'base field' => 'fid', 'relationship field' => 'fid'));
     // Describes relationships between files and comments.
     $data['file_usage']['file_to_comment'] = array('title' => t('Comment'), 'help' => t('A comment that is associated with this file, usually because this file is in a field on the comment.'), 'skip base' => array('node', 'node_field_revision', 'users', 'comment', 'taxonomy_term_data', 'taxonomy_vocabulary'), 'real field' => 'id', 'relationship' => array('title' => t('Comment'), 'label' => t('Comment'), 'base' => 'comment', 'base field' => 'cid', 'relationship field' => 'id', 'extra' => array(array('table' => 'file_usage', 'field' => 'type', 'operator' => '=', 'value' => 'comment'))));
     $data['file_usage']['comment_to_file'] = array('title' => t('File'), 'help' => t('A file that is associated with this comment, usually because it is in a field on the comment.'), 'skip base' => array('file_managed', 'node', 'node_field_revision', 'users', 'taxonomy_term_data', 'taxonomy_vocabulary'), 'real field' => 'fid', 'relationship' => array('title' => t('File'), 'label' => t('File'), 'base' => 'file_managed', 'base field' => 'fid', 'relationship field' => 'fid'));
     // Describes relationships between files and taxonomy_terms.
     $data['file_usage']['file_to_taxonomy_term'] = array('title' => t('Taxonomy Term'), 'help' => t('A taxonomy term that is associated with this file, usually because this file is in a field on the taxonomy term.'), 'skip base' => array('node', 'node_field_revision', 'users', 'comment', 'taxonomy_term_data', 'taxonomy_vocabulary'), 'real field' => 'id', 'relationship' => array('title' => t('Taxonomy Term'), 'label' => t('Taxonomy Term'), 'base' => 'taxonomy_term_data', 'base field' => 'tid', 'relationship field' => 'id', 'extra' => array(array('table' => 'file_usage', 'field' => 'type', 'operator' => '=', 'value' => 'taxonomy_term'))));
     $data['file_usage']['taxonomy_term_to_file'] = array('title' => t('File'), 'help' => t('A file that is associated with this taxonomy term, usually because it is in a field on the taxonomy term.'), 'skip base' => array('file_managed', 'node', 'node_field_revision', 'users', 'comment', 'taxonomy_vocabulary'), 'real field' => 'fid', 'relationship' => array('title' => t('File'), 'label' => t('File'), 'base' => 'file_managed', 'base field' => 'fid', 'relationship field' => 'fid'));
     // Describes relationships between files and taxonomy_vocabulary items.
     $data['file_usage']['file_to_taxonomy_vocabulary'] = array('title' => t('Taxonomy Vocabulary'), 'help' => t('A taxonomy vocabulary that is associated with this file, usually because this file is in a field on the taxonomy vocabulary.'), 'skip base' => array('node', 'node_field_revision', 'users', 'comment', 'taxonomy_term_data', 'taxonomy_vocabulary'), 'real field' => 'id', 'relationship' => array('title' => t('Taxonomy Vocabulary'), 'label' => t('Taxonomy Vocabulary'), 'base' => 'taxonomy_vocabulary', 'base field' => 'vid', 'relationship field' => 'id', 'extra' => array(array('table' => 'file_usage', 'field' => 'type', 'operator' => '=', 'value' => 'taxonomy_vocabulary'))));
     $data['file_usage']['taxonomy_vocabulary_to_file'] = array('title' => t('File'), 'help' => t('A file that is associated with this taxonomy vocabulary, usually because it is in a field on the taxonomy vocabulary.'), 'skip base' => array('file_managed', 'node', 'node_field_revision', 'users', 'comment', 'taxonomy_term_data'), 'real field' => 'fid', 'relationship' => array('title' => t('File'), 'label' => t('File'), 'base' => 'file_managed', 'base field' => 'fid', 'relationship field' => 'fid'));
     // Provide basic fields from the {file_usage} table to all of the base tables
     // we've declared joins to, because there is no 'skip base' property on these
     // fields.
     $data['file_usage']['module'] = array('title' => t('Module'), 'help' => t('The module managing this file relationship.'), 'field' => array('id' => 'standard'), 'filter' => array('id' => 'string'), 'argument' => array('id' => 'string'), 'sort' => array('id' => 'standard'));
     $data['file_usage']['type'] = array('title' => t('Entity type'), 'help' => t('The type of entity that is related to the file.'), 'field' => array('id' => 'standard'), 'filter' => array('id' => 'string'), 'argument' => array('id' => 'string'), 'sort' => array('id' => 'standard'));
     $data['file_usage']['id'] = array('title' => t('Entity ID'), 'help' => t('The ID of the entity that is related to the file.'), 'field' => array('id' => 'numeric'), 'argument' => array('id' => 'numeric'), 'filter' => array('id' => 'numeric'), 'sort' => array('id' => 'standard'));
     $data['file_usage']['count'] = array('title' => t('Use count'), 'help' => t('The number of times the file is used by this entity.'), 'field' => array('id' => 'numeric'), 'filter' => array('id' => 'numeric'), 'sort' => array('id' => 'standard'));
     $data['file_usage']['entity_label'] = array('title' => t('Entity label'), 'help' => t('The label of the entity that is related to the file.'), 'real field' => 'id', 'field' => array('id' => 'entity_label', 'entity type field' => 'type'));
     return $data;
 }
开发者ID:davidsoloman,项目名称:drupalconsole.com,代码行数:58,代码来源:FileViewsData.php


示例15: getViewsData

  /**
   * {@inheritdoc}
   */
  public function getViewsData() {
    $data = parent::getViewsData();

    $data['ps_category']['table']['base'] = array(
      'field' => 'id',
      'title' => $this->t('Category'),
      'help' => $this->t('The Category ID.'),
    );

    return $data;
  }
开发者ID:Koalasoft,项目名称:product_search,代码行数:14,代码来源:CategoryViewsData.php


示例16: getViewsData

 /**
  * {@inheritdoc}
  */
 public function getViewsData()
 {
     $data = parent::getViewsData();
     //
     //    $data['myeck']['table']['base'] = array(
     //      'field' => 'id',
     //      'title' => $this->t('Myeck entity'),
     //      'help' => $this->t('The Myeck entity ID.'),
     //    );
     return $data;
 }
开发者ID:alexawg2015,项目名称:drupal-8,代码行数:14,代码来源:MyeckEntityViewsData.php


示例17: getViewsData

 /**
  * {@inheritdoc}
  */
 public function getViewsData()
 {
     $data = parent::getViewsData();
     // Cart items table.
     $data['uc_cart_products']['table']['group'] = $this->t('Cart item');
     $data['uc_cart_products']['table']['base'] = array('field' => 'cart_item_id', 'title' => $this->t('Cart items'), 'help' => $this->t('Products in customer carts.'));
     $data['uc_cart_products']['nid'] = array('title' => $this->t('Nid'), 'help' => $this->t('The node ID of a product in the cart.'), 'field' => array('id' => 'node', 'click sortable' => TRUE), 'relationship' => array('title' => $this->t('Node'), 'help' => $this->t('Relate cart item to node.'), 'id' => 'standard', 'base' => 'node', 'field' => 'nid', 'label' => $this->t('node')), 'argument' => array('id' => 'node_nid', 'name field' => 'title'), 'sort' => array('id' => 'standard'), 'filter' => array('id' => 'numeric'));
     $data['uc_cart_products']['cart_id'] = array('title' => $this->t('Cart ID'), 'help' => $this->t('The ID of the cart (user ID for authenticated users, session ID for anonymous users).'), 'field' => array('id' => 'standard', 'click sortable' => TRUE), 'argument' => array('id' => 'user_uid', 'name field' => 'name'), 'sort' => array('id' => 'standard'), 'filter' => array('id' => 'standard'));
     $data['uc_cart_products']['qty'] = array('title' => $this->t('Quantity'), 'help' => $this->t('The quantity to be ordered.'), 'field' => array('id' => 'numeric', 'click sortable' => TRUE), 'sort' => array('id' => 'standard'), 'filter' => array('id' => 'numeric'));
     return $data;
 }
开发者ID:justincletus,项目名称:webdrupalpro,代码行数:14,代码来源:CartItemViewsData.php


示例18: getViewsData

 /**
  * {@inheritdoc}
  */
 public function getViewsData() {
   $data = parent::getViewsData();
   $data['eform_submission']['eform_submission_bulk_form'] = array(
     'title' => t('Bulk update'),
     'help' => t('Add a form element that lets you run operations on multiple EForm Submissions.'),
     'field' => array(
       //'id' => 'eform_submission_bulk_form',
       'id' => 'bulk_form',
     ),
   );
   return $data;
 }
开发者ID:AshishNaik021,项目名称:iimisac-d8,代码行数:15,代码来源:EFormSubmissionViewsData.php


示例19: getViewsData

 /**
  * {@inheritdoc}
  */
 public function getViewsData()
 {
     $data = parent::getViewsData();
     $data['taxonomy_term_data']['table']['base']['help'] = t('Taxonomy terms are attached to nodes.');
     $data['taxonomy_term_data']['table']['base']['access query tag'] = 'term_access';
     $data['taxonomy_term_data']['table']['wizard_id'] = 'taxonomy_term';
     $data['taxonomy_term_data']['table']['join'] = array('taxonomy_index' => array('field' => 'tid', 'left_field' => 'tid'));
     $data['taxonomy_term_data']['tid']['help'] = t('The tid of a taxonomy term.');
     $data['taxonomy_term_data']['tid']['argument']['id'] = 'taxonomy';
     $data['taxonomy_term_data']['tid']['argument']['name field'] = 'name';
     $data['taxonomy_term_data']['tid']['argument']['zero is null'] = TRUE;
     $data['taxonomy_term_data']['tid']['filter']['id'] = 'taxonomy_index_tid';
     $data['taxonomy_term_data']['tid']['filter']['title'] = t('Term');
     $data['taxonomy_term_data']['tid']['filter']['help'] = t('Taxonomy term chosen from autocomplete or select widget.');
     $data['taxonomy_term_data']['tid']['filter']['hierarchy table'] = 'taxonomy_term_hierarchy';
     $data['taxonomy_term_data']['tid']['filter']['numeric'] = TRUE;
     $data['taxonomy_term_data']['tid_raw'] = array('title' => t('Term ID'), 'help' => t('The tid of a taxonomy term.'), 'real field' => 'tid', 'filter' => array('id' => 'numeric', 'allow empty' => TRUE));
     $data['taxonomy_term_data']['tid_representative'] = array('relationship' => array('title' => t('Representative node'), 'label' => t('Representative node'), 'help' => t('Obtains a single representative node for each term, according to a chosen sort criterion.'), 'id' => 'groupwise_max', 'relationship field' => 'tid', 'outer field' => 'taxonomy_term_field_data.tid', 'argument table' => 'taxonomy_term_field_data', 'argument field' => 'tid', 'base' => 'node', 'field' => 'nid', 'relationship' => 'node:term_node_tid'));
     $data['taxonomy_term_data']['vid']['help'] = t('Filter the results of "Taxonomy: Term" to a particular vocabulary.');
     unset($data['taxonomy_term_data']['vid']['field']);
     unset($data['taxonomy_term_data']['vid']['argument']);
     unset($data['taxonomy_term_data']['vid']['sort']);
     $data['taxonomy_term_data']['edit_term'] = array('field' => array('title' => t('Term edit link'), 'help' => t('Provide a simple link to edit the term.'), 'id' => 'term_link_edit', 'click sortable' => FALSE));
    

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP views\ViewExecutable类代码示例发布时间:2022-05-23
下一篇:
PHP Entity\User类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap