当前位置: 首页>>代码示例>>PHP>>正文


PHP ConfigEntityBase::__sleep方法代码示例

本文整理汇总了PHP中Drupal\Core\Config\Entity\ConfigEntityBase::__sleep方法的典型用法代码示例。如果您正苦于以下问题:PHP ConfigEntityBase::__sleep方法的具体用法?PHP ConfigEntityBase::__sleep怎么用?PHP ConfigEntityBase::__sleep使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Drupal\Core\Config\Entity\ConfigEntityBase的用法示例。


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

示例1: __sleep

 /**
  * {@inheritdoc}
  */
 public function __sleep()
 {
     $keys = parent::__sleep();
     unset($keys[array_search('executable', $keys)]);
     return $keys;
 }
开发者ID:aWEBoLabs,项目名称:taxi,代码行数:9,代码来源:View.php

示例2: __sleep

 /**
  * {@inheritdoc}
  */
 public function __sleep()
 {
     $vars = parent::__sleep();
     // Avoid serializing plugin collections and the page executable as they
     // might contain references to a lot of objects including the container.
     $unset_vars = ['variants' => NULL, 'accessConditionCollection' => 'access_variants', 'executable' => NULL];
     foreach ($unset_vars as $unset_var => $configuration_key) {
         if (!empty($this->{$unset_var})) {
             if ($configuration_key) {
                 $this->set($configuration_key, $this->{$unset_var}->getConfiguration());
             }
             unset($vars[array_search($unset_var, $vars)]);
         }
     }
     return $vars;
 }
开发者ID:neeravbm,项目名称:unify-d8,代码行数:19,代码来源:Page.php

示例3: __sleep

 /**
  * {@inheritdoc}
  */
 public function __sleep()
 {
     $vars = parent::__sleep();
     // Gathered contexts objects should not be serialized.
     unset($vars[array_search('contexts', $vars)]);
     return $vars;
 }
开发者ID:nB-MDSO,项目名称:mdso-d8blog,代码行数:10,代码来源:PageVariant.php

示例4: __sleep

 /**
  * {@inheritdoc}
  */
 public function __sleep()
 {
     $vars = parent::__sleep();
     // Ensure any plugin collections are stored correctly before serializing.
     // @todo Let https://www.drupal.org/node/2650588 handle this instead.
     foreach ($this->getPluginCollections() as $plugin_config_key => $plugin_collection) {
         $this->set($plugin_config_key, $plugin_collection->getConfiguration());
     }
     // Avoid serializing plugin collections and entities as they might contain
     // references to a lot of objects including the container.
     $unset_vars = ['variants', 'accessConditionCollection'];
     foreach ($unset_vars as $unset_var) {
         if (!empty($this->{$unset_var})) {
             unset($vars[array_search($unset_var, $vars)]);
         }
     }
     return $vars;
 }
开发者ID:nB-MDSO,项目名称:mdso-d8blog,代码行数:21,代码来源:Page.php


注:本文中的Drupal\Core\Config\Entity\ConfigEntityBase::__sleep方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。