本文整理匯總了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")));
}