/** * Returns all attributes of this type as collection. * * @return NotificationTypeAttributeCollection */ public function getAttributeCollection() { $collection = new NotificationTypeAttributeCollection(); foreach ($this->getNotificationTypeAttributes() as $eachAttribute) { $collection->add($eachAttribute); } return $collection; }
/** * Returns all NotificationTypeAttributes to be registered with the sfNotificationsPlugin. * * @return NotificationTypeAttributeCollection */ public static function getAttributeCollection() { $collection = new NotificationTypeAttributeCollection(); $subject = new NotificationTypeAttribute(); $subject->setName('subject')->setDisplayName('Subject'); $collection->add($subject); $recipient = new NotificationTypeAttribute(); $recipient->setName('recipient')->setDisplayName('Recipient'); $collection->add($recipient); return $collection; }
/** * Returns all NotificationTypeAttributes to be registered with the sfNotificationsPlugin. * * @return NotificationTypeAttributeCollection */ public static function getAttributeCollection() { $filenameAttribute = new NotificationTypeAttribute(); $filenameAttribute->setName('filename'); $collection = new NotificationTypeAttributeCollection(); return $collection->add($filenameAttribute); }