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


PHP Release::save方法代码示例

本文整理汇总了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;
 }
开发者ID:ajbrown,项目名称:bitnotion,代码行数:21,代码来源:CatalogController.php

示例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'];
}
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:31,代码来源:Save.php


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