本文整理汇总了PHP中ViewableData::setField方法的典型用法代码示例。如果您正苦于以下问题:PHP ViewableData::setField方法的具体用法?PHP ViewableData::setField怎么用?PHP ViewableData::setField使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ViewableData
的用法示例。
在下文中一共展示了ViewableData::setField方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getLayerlistForTemplate
/**
* Returns layers in a customised viewable data object
* to render the layer control of the default map.
*
* @return ViewableData
*/
public function getLayerlistForTemplate()
{
$mapObject = $this->GetComponent('Map');
$obj = new ViewableData();
$result = array();
if ($mapObject) {
$overlayLayers = $mapObject->getComponents('Layers', "Enabled = 1 AND LayerType = 'overlay'", 'DisplayPriority DESC');
$backgroundLayers = $mapObject->getComponents('Layers', "Enabled = 1 AND LayerType = 'background'", 'DisplayPriority DESC');
$obj->setField("MapPage", $this);
$obj->setField("overlayLayers", $overlayLayers);
$obj->setField("backgroundLayers", $backgroundLayers);
}
return $obj;
}
示例2: getMergeFieldsMap
/**
* Allows the use of field values in email body.
*
* @param ArrayList fields
* @return ViewableData
*/
private function getMergeFieldsMap($fields = array())
{
$data = new ViewableData();
foreach ($fields as $field) {
$data->setField($field->Name, DBField::create_field('Text', $field->Value));
}
return $data;
}