コード例 #1
0
 /**
  * Constructor for class
  * @param string $relatedItemsRelationName
  * @param string $relatedItemsFormName
  * @param string $productCategoryFormName
  */
 public function __construct($relatedItemsRelationName, $relatedItemsFormName, $productCategoryFormName)
 {
     assert('is_string($relatedItemsRelationName)');
     assert('is_string($relatedItemsFormName)');
     parent::__construct($relatedItemsRelationName, $relatedItemsFormName);
     $this->productCategoryFormName = $productCategoryFormName;
 }
コード例 #2
0
 /**
  * Override to handle incoming conversation participant information
  * (non-PHPdoc)
  * @see ModelHasRelatedItemsZurmoControllerUtil::afterSetAttributesDuringSave()
  */
 protected function afterSetAttributesDuringSave($model, $explicitReadWriteModelPermissions)
 {
     assert('$model instanceof Conversation');
     assert('$explicitReadWriteModelPermissions instanceof ExplicitReadWriteModelPermissions');
     parent::afterSetAttributesDuringSave($model, $explicitReadWriteModelPermissions);
     $postData = PostUtil::getData();
     if (isset($postData[$this->conversationParticipantFormName])) {
         $this->peopleAddedAsConversationParticipants = ConversationParticipantsUtil::resolveConversationHasManyParticipantsFromPost($model, $postData[$this->conversationParticipantFormName], $explicitReadWriteModelPermissions);
     }
 }