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


PHP ConfigEntityBase::toArray方法代碼示例

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


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

示例1: toArray

 /**
  * {@inheritdoc}
  */
 public function toArray()
 {
     $properties = parent::toArray();
     // The 'roles' property is only used during install and should never
     // actually be saved.
     unset($properties['roles']);
     return $properties;
 }
開發者ID:anyforsoft,項目名稱:csua_d8,代碼行數:11,代碼來源:FilterFormat.php

示例2: toArray

 /**
  * {@inheritdoc}
  */
 public function toArray()
 {
     $properties = parent::toArray();
     $names = array('protections', 'protectedEntityTypeId', 'protectedEntityId');
     foreach ($names as $name) {
         $properties[$name] = $this->get($name);
     }
     return $properties;
 }
開發者ID:augustpascual-mse,項目名稱:job-searching-network,代碼行數:12,代碼來源:ProtectionRule.php

示例3: testToArrayFallback

 /**
  * @covers ::toArray
  *
  * @expectedException \Drupal\Core\Config\Schema\SchemaIncompleteException
  */
 public function testToArrayFallback()
 {
     $this->entityType->expects($this->any())->method('getPropertiesToExport')->willReturn([]);
     $this->entity->toArray();
 }
開發者ID:ddrozdik,項目名稱:dmaps,代碼行數:10,代碼來源:ConfigEntityBaseUnitTest.php

示例4: testToArrayFallback

 /**
  * @covers ::toArray
  *
  * @expectedException \Drupal\Core\Config\Schema\SchemaIncompleteException
  */
 public function testToArrayFallback()
 {
     $this->entity->toArray();
 }
開發者ID:davidsoloman,項目名稱:drupalconsole.com,代碼行數:9,代碼來源:ConfigEntityBaseUnitTest.php

示例5: toArray

 /**
  * {@inheritdoc}
  */
 public function toArray()
 {
     $properties = parent::toArray();
     // Do not store options for fields whose display is not set to be
     // configurable.
     foreach ($this->getFieldDefinitions() as $field_name => $definition) {
         if (!$definition->isDisplayConfigurable($this->displayContext)) {
             unset($properties['content'][$field_name]);
             unset($properties['hidden'][$field_name]);
         }
     }
     return $properties;
 }
開發者ID:nstielau,項目名稱:drops-8,代碼行數:16,代碼來源:EntityDisplayBase.php

示例6: toArray

 /**
  * {@inheritdoc}
  */
 public function toArray()
 {
     // @todo It's a bug that we have to do this. Backend configuration should
     //   always be set via the server's setBackendConfiguration() method,
     //   otherwise the two can diverge causing this and other problems. The
     //   alternative would be to call $server->setBackendConfiguration() in the
     //   backend's setConfiguration() method and use a second $propagate
     //   parameter to avoid an infinite loop. Similar things go for the index's
     //   various plugins. Maybe using plugin bags is the solution here?
     $properties = parent::toArray();
     if ($this->hasValidBackend()) {
         $properties['backend_config'] = $this->getBackend()->getConfiguration();
     }
     return $properties;
 }
開發者ID:curveagency,項目名稱:intranet,代碼行數:18,代碼來源:Server.php

示例7: toArray

 /**
  * {@inheritdoc}
  */
 public function toArray()
 {
     $properties = parent::toArray();
     // Additionally, include the field type, that is needed to be able to
     // generate the field-type-dependant parts of the config schema and to
     // allow for mapping settings from storage by field type.
     // @see \Drupal\field\FieldInstanceConfigStorage::mapFromStorageRecords().
     $properties['field_type'] = $this->getType();
     return $properties;
 }
開發者ID:shumer,項目名稱:blog,代碼行數:13,代碼來源:FieldInstanceConfig.php

示例8: toArray

 /**
  * {@inheritdoc}
  */
 public function toArray()
 {
     $properties = parent::toArray();
     $names = ['id', 'label', 'path', 'display_variants', 'access_conditions', 'access_logic', 'use_admin_theme', 'static_context'];
     foreach ($names as $name) {
         $properties[$name] = $this->get($name);
     }
     return $properties;
 }
開發者ID:pulibrary,項目名稱:recap,代碼行數:12,代碼來源:Page.php


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