當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。