本文整理汇总了PHP中HtmlHelper::getEntity方法的典型用法代码示例。如果您正苦于以下问题:PHP HtmlHelper::getEntity方法的具体用法?PHP HtmlHelper::getEntity怎么用?PHP HtmlHelper::getEntity使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HtmlHelper
的用法示例。
在下文中一共展示了HtmlHelper::getEntity方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
break;
case 'GetSubEntity':
$methodName = 'Get' . $subEntityName;
$apiResult = $api->{$subApiName}->{$methodName}($entityId, $subEntityId);
break;
case 'SaveSubEntity':
$entity = HtmlHelper::getEntity($subEntityName);
$methodName = 'Update' . $subEntityName;
$apiResult = $api->{$subApiName}->{$methodName}($subEntityId, $entity);
break;
case 'ListSubEntity':
$pagination = HtmlHelper::getEntity('Pagination');
$methodName = $subEntityName;
$filter = null;
if (isset($filterName) && $filterName != "") {
$filter = HtmlHelper::getEntity($filterName);
}
if (isset($filter) && !isset($sorting)) {
$apiResult = $api->{$subApiName}->{$methodName}($entityId, $pagination, $filter);
} else {
if (!isset($filter) && isset($sorting)) {
$apiResult = $api->{$subApiName}->{$methodName}($entityId, $pagination, $sorting);
} else {
if (isset($filter) && isset($sorting)) {
$apiResult = $api->{$subApiName}->{$methodName}($entityId, $pagination, $filter, $sorting);
} else {
$apiResult = $api->{$subApiName}->{$methodName}($entityId, $pagination);
}
}
}
print '<pre>';
示例2: print_r
}
print '<pre>';
print_r($pagination);
print '</pre>';
if (isset($sorting)) {
print '<pre>Sort: ';
}
print_r($_POST["_sort_"]);
print '</pre>';
break;
case 'CreatePageByFile':
$methodName = 'Create' . $subEntityName . 'FromFile';
$apiResult = $api->{$subApiName}->{$methodName}($entityId, $subEntityId, $_FILES['page_file']);
break;
case 'ContestDispute':
$entity = HtmlHelper::getEntity($subEntityName);
$apiResult = $api->{$subApiName}->{$operation}($entityId, $entity);
break;
case 'CloseDispute':
$apiResult = $api->{$subApiName}->{$operation}($entityId);
break;
}
print '<pre>';
print_r($apiResult);
print '</pre>';
} catch (\MangoPay\Libraries\ResponseException $e) {
echo '<div style="color: red;">\\MangoPay\\ResponseException: Code: ' . $e->getCode();
echo '<br/>Message: ' . $e->getMessage();
$details = $e->GetErrorDetails();
if (!is_null($details)) {
echo '<br/><br/>Details: ';