本文整理汇总了PHP中Kronolith::randomColor方法的典型用法代码示例。如果您正苦于以下问题:PHP Kronolith::randomColor方法的具体用法?PHP Kronolith::randomColor怎么用?PHP Kronolith::randomColor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Kronolith
的用法示例。
在下文中一共展示了Kronolith::randomColor方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: createDefaultShare
/**
* Create the default calendar share for the current user.
*
* @return Horde_Share_Object The new default share.
*/
public function createDefaultShare()
{
$share = $this->_shares->newShare($this->_user, strval(new Horde_Support_Randomid()), $this->_getDefaultShareName());
$share->set('color', Kronolith::randomColor());
$this->_prepareDefaultShare($share);
$this->_shares->addShare($share);
return $share;
}
示例2: __construct
public function __construct($vars)
{
parent::__construct($vars, _("Create Calendar"));
$this->addVariable(_("Name"), 'name', 'text', true);
$v = $this->addVariable(_("Color"), 'color', 'colorpicker', false);
$v->setDefault(Kronolith::randomColor());
if ($GLOBALS['registry']->isAdmin()) {
$this->addVariable(_("System Calendar"), 'system', 'boolean', false, false, _("System calendars don't have an owner. Only administrators can change the calendar settings and permissions."));
}
$this->addVariable(_("Description"), 'description', 'longtext', false, false, null, array(4, 60));
$this->addVariable(_("Tags"), 'tags', 'kronolith:KronolithTags', false);
$this->setButtons(array(_("Create")));
}