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


PHP Conversation::getMetadata方法代码示例

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


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

示例1: init

 public function init()
 {
     $metadata = Conversation::getMetadata();
     $observedModelClassNames = $metadata['Conversation']['conversationItemsModelClassNames'];
     if ($observedModelClassNames == null) {
         return;
     }
     foreach ($observedModelClassNames as $modelClassName) {
         $modelClassName::model()->attachEventHandler('onAfterDelete', array($this, 'deleteConversationItems'));
     }
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:11,代码来源:ConversationsObserver.php

示例2: canUserPerformAction

 /**
  * Runs through relations and makes sure the user can access at least one relation. If at least one is
  * accessible, true is returned.
  */
 public function canUserPerformAction()
 {
     $metadata = Conversation::getMetadata();
     foreach ($metadata['Conversation']['conversationItemsModelClassNames'] as $modelClassName) {
         if (is_subclass_of($modelClassName, 'Item') && $modelClassName::getModuleClassName() != null) {
             if (RightsUtil::canUserAccessModule($modelClassName::getModuleClassName(), $this->user)) {
             }
             return true;
         }
     }
     return false;
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:16,代码来源:ConversationItemsModalListActionSecurity.php

示例3: resolveNewModelByRelationInformation

 /**
  * Override to handle the special scenario of relations for a conversation. Since relations are done in the
  * ConversationItems, the relation information needs to handled in a specific way.
  * @see ZurmoModuleController->resolveNewModelByRelationInformation
  */
 protected function resolveNewModelByRelationInformation($model, $relationModelClassName, $relationModelId, $relationModuleId)
 {
     assert('$model instanceof Conversation');
     assert('is_string($relationModelClassName) || null');
     assert('is_int($relationModelId)');
     assert('is_string($relationModuleId)');
     $metadata = Conversation::getMetadata();
     if (in_array($relationModelClassName, $metadata['Conversation']['conversationItemsModelClassNames'])) {
         $model->conversationItems->add($relationModelClassName::getById((int) $relationModelId));
     } else {
         throw new NotSupportedException();
     }
     return $model;
 }
开发者ID:sandeep1027,项目名称:zurmo_,代码行数:19,代码来源:DefaultController.php

示例4: getRelatedItemsModelClassNames

 protected static function getRelatedItemsModelClassNames()
 {
     $metadata = Conversation::getMetadata();
     return $metadata['Conversation']['conversationItemsModelClassNames'];
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:5,代码来源:ConversationItemsElement.php

示例5: __construct

 public function __construct($relationModel)
 {
     $metadata = Conversation::getMetadata();
     assert('in_array(get_class($relationModel), $metadata["Conversation"]["conversationItemsModelClassNames"])');
     parent::__construct($relationModel);
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:6,代码来源:ConversationItemForm.php


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