当前位置: 首页>>代码示例>>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;未经允许,请勿转载。