本文整理汇总了PHP中Release::save方法的典型用法代码示例。如果您正苦于以下问题:PHP Release::save方法的具体用法?PHP Release::save怎么用?PHP Release::save使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Release
的用法示例。
在下文中一共展示了Release::save方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addreleaseAction
public function addreleaseAction()
{
$form = new App_Form_Release();
$form->addElement('Submit', 'continue', array('label' => 'Save & Add Tracks', 'value' => 'continue'));
if (!empty($_POST) && $form->isValid($_POST)) {
//find the artistId for this account:
$release = new Release();
$release->title = $form->getValue('title');
$release->artistId = $this->_artist->id;
$release->publishDate = $form->getValue('publishDate');
$release->save();
$this->_flash->addMessage('Your release has been created.');
if ($form->getValue('continue') != null) {
$this->_redirector->gotoSimple('addtrack', null, null, array('releaseId' => $release->id));
}
$form->setDefaults(array('publishDate' => date('m/d/Y')));
}
$form->setMethod('post');
$form->setAction('/dashboard/catalog/addrelease');
$this->view->form = $form;
}
示例2: Release
********************************************************************************/
require_once 'modules/Releases/Release.php';
$focus = new Release();
$focus->retrieve($_REQUEST['record']);
foreach ($focus->column_fields as $field) {
if (isset($_REQUEST[$field])) {
$focus->{$field} = $_REQUEST[$field];
}
}
foreach ($focus->additional_column_fields as $field) {
if (isset($_REQUEST[$field])) {
$value = $_REQUEST[$field];
$focus->{$field} = $value;
}
}
$focus->save();
$return_id = $focus->id;
$edit = '';
if (isset($_REQUEST['return_module']) && $_REQUEST['return_module'] != "") {
$return_module = $_REQUEST['return_module'];
} else {
$return_module = "Releases";
}
if (isset($_REQUEST['return_action']) && $_REQUEST['return_action'] != "") {
$return_action = $_REQUEST['return_action'];
} else {
$return_action = "DetailView";
}
if (isset($_REQUEST['return_id']) && $_REQUEST['return_id'] != "") {
$return_id = $_REQUEST['return_id'];
}