本文整理汇总了PHP中ObjectModel::getWebserviceParameters方法的典型用法代码示例。如果您正苦于以下问题:PHP ObjectModel::getWebserviceParameters方法的具体用法?PHP ObjectModel::getWebserviceParameters怎么用?PHP ObjectModel::getWebserviceParameters使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ObjectModel
的用法示例。
在下文中一共展示了ObjectModel::getWebserviceParameters方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderEntity
/**
* Build the entity detail.
*
* @param ObjectModel $object create by the entity
* @param int $depth the depth for the tree diagram
* @return string
*/
public function renderEntity($object, $depth)
{
$output = '';
$ws_params = $object->getWebserviceParameters();
foreach ($this->wsParamOverrides as $p) {
$o = $p['object'];
$ws_params = $o->{$p['method']}($ws_params);
}
$output .= $this->setIndent($depth) . $this->objectRender->renderNodeHeader($ws_params['objectNodeName'], $ws_params);
if ($object->id != 0) {
// This to add virtual Fields for a particular entity.
$virtual_fields = $this->addVirtualFields($ws_params['objectsNodeName'], $object);
if (!empty($virtual_fields)) {
$ws_params['fields'] = array_merge($ws_params['fields'], $virtual_fields);
}
foreach ($ws_params['fields'] as $field_name => $field) {
if ($this->fieldsToDisplay === 'full' || array_key_exists($field_name, $this->fieldsToDisplay)) {
$field['object_id'] = $object->id;
$field['entity_name'] = $ws_params['objectNodeName'];
$field['entities_name'] = $ws_params['objectsNodeName'];
$output .= $this->renderField($object, $ws_params, $field_name, $field, $depth);
}
}
}
$subexists = false;
if (is_array($this->fieldsToDisplay)) {
foreach ($this->fieldsToDisplay as $fields) {
if (is_array($fields)) {
$subexists = true;
}
}
}
if (isset($ws_params['associations']) && ($this->fieldsToDisplay == 'full' || $subexists)) {
$output .= $this->renderAssociations($object, $depth, $ws_params['associations'], $ws_params);
}
$output .= $this->setIndent($depth) . $this->objectRender->renderNodeFooter($ws_params['objectNodeName'], $ws_params);
return $output;
}