本文整理汇总了PHP中Dashlet::load方法的典型用法代码示例。如果您正苦于以下问题:PHP Dashlet::load方法的具体用法?PHP Dashlet::load怎么用?PHP Dashlet::load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Dashlet
的用法示例。
在下文中一共展示了Dashlet::load方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getAdditionalFields
public function getAdditionalFields($data)
{
$this->setResponseType('json');
$result = new stdclass();
$result->status = 'OK';
try {
$dashlet = new Dashlet();
$dashletFields = $dashlet->load($data->DAS_UID);
if (!is_null($dashletFields)) {
$result->additionalFields = PMDashlet::getAdditionalFields($dashletFields['DAS_CLASS']);
} else {
throw new Exception('Dashlet "' . $data->DAS_UID . '" does not exist.');
}
} catch (Exception $error) {
$result->status = 'ERROR';
$result->message = $error->getMessage();
}
return $result;
}
示例2: loadDashletInstance
public function loadDashletInstance($dasInsUid)
{
try {
$dashletInstance = $this->load($dasInsUid);
//Load data from the serialized field
$dashlet = new Dashlet();
$dashletFields = $dashlet->load($dashletInstance['DAS_UID']);
if (is_null($dashletFields)) {
$dashletFields = array();
}
return array_merge($dashletFields, $dashletInstance);
} catch (Exception $error) {
throw $error;
}
}