当前位置: 首页>>代码示例>>PHP>>正文


PHP AdminHelper::getElementValues方法代码示例

本文整理汇总了PHP中AdminHelper::getElementValues方法的典型用法代码示例。如果您正苦于以下问题:PHP AdminHelper::getElementValues方法的具体用法?PHP AdminHelper::getElementValues怎么用?PHP AdminHelper::getElementValues使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AdminHelper的用法示例。


在下文中一共展示了AdminHelper::getElementValues方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array_slice

            $tmp_locations_array = array_slice($tmp_locations_array, 0, 5);
            // 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;
开发者ID:JamesLinus,项目名称:platform,代码行数:31,代码来源:elements_edit.php


注:本文中的AdminHelper::getElementValues方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。