本文整理汇总了PHP中Annotation::toArray方法的典型用法代码示例。如果您正苦于以下问题:PHP Annotation::toArray方法的具体用法?PHP Annotation::toArray怎么用?PHP Annotation::toArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Annotation
的用法示例。
在下文中一共展示了Annotation::toArray方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onDocAnnotated
/**
* Method for handling annotation notifications
*
* @param Annotation $data
* @return null
*/
public function onDocAnnotated($data)
{
$notices = Notification::getActiveNotifications(MadisonEvent::DOC_ANNOTATED);
$notifications = $this->processNotices($notices, MadisonEvent::DOC_ANNOTATED);
$doc = Doc::find($data->doc_id);
//Load annotation link
$data->link = $data->getLink();
$this->doNotificationActions($notifications, array('data' => array('annotation' => $data->toArray(), 'doc' => $doc->toArray()), 'subject' => 'A new annotation on a document!', 'from_email_address' => static::FROM_EMAIL_ADDRESS, 'from_email_name' => static::FROM_EMAIL_NAME));
}
示例2: annotations
/**
* Defines how chart annotations will be displayed.
*
* @param Annotation $a
* @return BarChart
*/
public function annotations(Annotation $a)
{
return $this->addOption($a->toArray());
}