本文整理匯總了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: ';