public function __construct($objId = null, $action = null, $NotificationId = null, $autoSave = true) { # We call super, because there are some essential steps that need to be performed # before we start (also this is used when retrieving an existing Object from DB) parent::__construct($NotificationId); # If we want to create a new Notification if ($objId) { $this->Controller = "notes"; $this->CreatorUserId = HTTPSession::getInstance()->GetUserID(); $this->ObjectId = $objId; $this->ObjectType = "Note"; $this->ProjectId = HTTPSession::getInstance()->PROJECT_ID; $this->Action = $action; # We have just set the values above, however unless we use set methods, DataBoundObject # won't recognize these as modified, therefore we have to add them to modified relations table $this->arModifiedRelations['Controller'] = "1"; $this->arModifiedRelations['CreatorUserId'] = "1"; $this->arModifiedRelations['ObjectId'] = "1"; $this->arModifiedRelations['ObjectType'] = "1"; $this->arModifiedRelations['ProjectId'] = "1"; $this->arModifiedRelations['Action'] = "1"; # Save the notification if ($autoSave) { $this->Save(); } } }
/** * @param $Keys array with keys 'userid', 'occid'. */ function __construct($Keys, $Extra = NULL) { parent::__construct(self::$notTypeInfo, $Keys); if (NULL !== $Extra) { $CI =& get_instance(); $this->SetData('Custom', '<p>Summary: <strong><a href="' . site_url($Extra['link']) . $CI->uri->uri_string() . '">' . xml_escape($Extra['name']) . '</a></strong>'); } }
/** * Debug constructor. * * @param Label $label * @param Message $message * @param Context $context */ public function __construct(Label $label, Message $message, Context $context) { $type = new Type(TypeList::DEBUG); parent::__construct($label, $message, $type, $context); }
public function __construct() { parent::__construct(); }
/** * Constructor * *@param name Ignored and forced to NAME. *@param body the <code>Notification</code> body. (optional) *@param type the type of the <code>Notification</code> (optional) */ public function __construct($name, $body = null) { parent::__construct(ViewTestNote::NAME, $body); }
/** * @param array $notification */ protected function __construct(array $notification) { parent::__construct($notification); \Brosland\Chain\Utils::checkRequiredFields(self::$REQUIRED, $notification); }