本文整理汇总了PHP中BigTree::parsedFilesArray方法的典型用法代码示例。如果您正苦于以下问题:PHP BigTree::parsedFilesArray方法的具体用法?PHP BigTree::parsedFilesArray怎么用?PHP BigTree::parsedFilesArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BigTree
的用法示例。
在下文中一共展示了BigTree::parsedFilesArray方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
<?php
// See if we've hit post_max_size
if (!$_POST["_bigtree_post_check"]) {
$_SESSION["bigtree_admin"]["post_max_hit"] = true;
BigTree::redirect($_SERVER["HTTP_REFERER"]);
}
$admin->requireLevel(1);
$item = $admin->getSetting($_POST["id"]);
if ($item["system"] || $item["locked"] && $admin->Level < 2) {
$admin->growl("Settings", "Access Denied", "error");
} else {
$bigtree["crops"] = array();
$bigtree["errors"] = array();
$bigtree["post_data"] = $_POST;
$bigtree["file_data"] = BigTree::parsedFilesArray();
// Pretend like we're a normal field
$field = array("type" => $item["type"], "title" => $item["title"], "key" => "value", "options" => json_decode($item["options"], true), "ignore" => false, "input" => $bigtree["post_data"]["value"], "file_input" => $bigtree["file_data"]["value"]);
// Process the input
$output = BigTreeAdmin::processField($field);
if (!is_null($output)) {
$admin->updateSettingValue($_POST["id"], $output);
}
$admin->growl("Settings", "Updated Setting");
}
$_SESSION["bigtree_admin"]["form_data"] = array("page" => true, "return_link" => ADMIN_ROOT . "settings/", "edit_link" => ADMIN_ROOT . "settings/edit/" . $_POST["id"] . "/", "errors" => $bigtree["errors"]);
// Track resource allocation
$admin->allocateResources("settings", $_POST["id"]);
if (count($bigtree["crops"])) {
$_SESSION["bigtree_admin"]["form_data"]["crop_key"] = $cms->cacheUnique("org.bigtreecms.crops", $bigtree["crops"]);
BigTree::redirect(ADMIN_ROOT . "settings/crop/");
示例2: array
<?php
// Parse the resources
$bigtree["entry"] = array();
$bigtree["template"] = $cms->getTemplate($_POST["template"]);
$bigtree["file_data"] = BigTree::parsedFilesArray("resources");
$bigtree["post_data"] = $_POST["resources"];
// Duplicate vars and $upload_service in for backwards compat.
$data = $_POST["resources"];
$file_data = $_FILES["resources"];
$upload_service = new BigTreeUploadService();
foreach ((array) $bigtree["template"]["resources"] as $resource) {
unset($value);
// Backwards compat.
$field = array();
$field["key"] = $key = $resource["id"];
$field["options"] = $options = $resource;
if (empty($field["options"]["directory"])) {
$field["options"]["directory"] = $options["directory"] = "files/pages/";
}
$field["ignore"] = false;
$field["input"] = $bigtree["post_data"][$resource["id"]];
$field["file_input"] = $bigtree["file_data"][$resource["id"]];
// If we have a customized handler for this data type, run it, otherwise, it's simply the post value.
$field_type_path = BigTree::path("admin/form-field-types/process/" . $resource["type"] . ".php");
if (file_exists($field_type_path)) {
include $field_type_path;
} else {
if (is_array($bigtree["post_data"][$field["key"]])) {
$field["output"] = $bigtree["post_data"][$field["key"]];
} else {