本文整理汇总了PHP中AdminHelper::getElementTemplate方法的典型用法代码示例。如果您正苦于以下问题:PHP AdminHelper::getElementTemplate方法的具体用法?PHP AdminHelper::getElementTemplate怎么用?PHP AdminHelper::getElementTemplate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AdminHelper
的用法示例。
在下文中一共展示了AdminHelper::getElementTemplate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
// trim temp array to no more than 5
$locations_array = array();
// let's rebuild the locations array
foreach ($tmp_locations_array as $location => $total) {
$locations_array[] = array('access_location' => $location, 'total' => $total);
}
$cash_admin->page_data['location_analytics'] = new ArrayIterator($locations_array);
$cash_admin->page_data['method_analytics'] = new ArrayIterator($methods_array);
}
// Detects if element add has happened and deals with POST data if it has
AdminHelper::handleElementFormPOST($_POST, $cash_admin);
// Set basic id/name stuff for the element
AdminHelper::setBasicElementFormData($cash_admin);
// pull stored element data
$cash_admin->page_data = array_merge($cash_admin->page_data, AdminHelper::getElementValues($current_element));
$cash_admin->page_data['ui_title'] = '' . $current_element['name'] . '';
$cash_admin->page_data['element_button_text'] = 'Save changes';
$cash_admin->page_data['element_rendered_content'] = $cash_admin->mustache_groomer->render(AdminHelper::getElementTemplate($current_element), $cash_admin->page_data);
$campaign_response = $cash_admin->requestAndStore(array('cash_request_type' => 'element', 'cash_action' => 'getcampaignforelement', 'id' => $current_element['id']));
if ($campaign_response['payload']) {
$cash_admin->page_data['campaign_id'] = $campaign_response['payload']['id'];
$cash_admin->page_data['campaign_title'] = $campaign_response['payload']['title'];
}
} else {
AdminHelper::controllerRedirect('/elements/');
}
} else {
AdminHelper::controllerRedirect('/elements/');
}
$cash_admin->page_data['platform_path'] = CASH_PLATFORM_PATH;
$cash_admin->setPageContentTemplate('elements_details');