本文整理汇总了PHP中AdminHelper::parseMetaData方法的典型用法代码示例。如果您正苦于以下问题:PHP AdminHelper::parseMetaData方法的具体用法?PHP AdminHelper::parseMetaData怎么用?PHP AdminHelper::parseMetaData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AdminHelper
的用法示例。
在下文中一共展示了AdminHelper::parseMetaData方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$asset_location = '';
$asset_description = false;
$metadata = false;
if (isset($_POST['parent_id'])) {
$asset_parent = $_POST['parent_id'];
}
if (isset($_POST['connection_id'])) {
$connection_id = $_POST['connection_id'];
}
if (isset($_POST['asset_location'])) {
$asset_location = $_POST['asset_location'];
}
if (isset($_POST['asset_description'])) {
$asset_description = $_POST['asset_description'];
}
$metadata_and_tags = AdminHelper::parseMetaData($_POST);
$effective_user = $cash_admin->effective_user_id;
if ($_POST['asset_type'] == 'release') {
$metadata = array('artist_name' => $_POST['artist_name'], 'release_date' => $_POST['release_date'], 'matrix_number' => $_POST['matrix_number'], 'label_name' => $_POST['label_name'], 'genre' => $_POST['genre'], 'copyright' => $_POST['copyright'], 'publishing' => $_POST['publishing'], 'fulfillment' => json_decode($_POST['metadata_fulfillment']), 'private' => json_decode($_POST['metadata_private']), 'cover' => $_POST['metadata_cover'], 'publicist_name' => $_POST['publicist_name'], 'publicist_email' => $_POST['publicist_email'], 'onesheet' => $_POST['onesheet']);
}
$edit_response = $cash_admin->requestAndStore(array('cash_request_type' => 'asset', 'cash_action' => 'editasset', 'id' => $request_parameters[0], 'user_id' => $effective_user, 'title' => $_POST['asset_title'], 'description' => $asset_description, 'location' => $asset_location, 'connection_id' => $connection_id, 'parent_id' => $asset_parent, 'type' => $_POST['asset_type'], 'tags' => $metadata_and_tags['tags_details'], 'metadata' => $metadata));
if (!$edit_response['payload']) {
$cash_admin->page_data['error_message'] = "Error editing asset. Please try again";
} else {
$cash_admin->page_data['page_message'] = 'Success. Edited.';
}
}
// Get the current asset details:
$asset_response = $cash_admin->requestAndStore(array('cash_request_type' => 'asset', 'cash_action' => 'getasset', 'id' => $request_parameters[0]));
if ($asset_response['payload']) {
$cash_admin->page_data = array_merge($cash_admin->page_data, $asset_response['payload']);