本文整理汇总了PHP中app\func\Proc::GetPreviousURLBreadcrumbsFromSession方法的典型用法代码示例。如果您正苦于以下问题:PHP Proc::GetPreviousURLBreadcrumbsFromSession方法的具体用法?PHP Proc::GetPreviousURLBreadcrumbsFromSession怎么用?PHP Proc::GetPreviousURLBreadcrumbsFromSession使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\func\Proc
的用法示例。
在下文中一共展示了Proc::GetPreviousURLBreadcrumbsFromSession方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionSettings
public function actionSettings()
{
$model = Fregatsettings::findOne(1);
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(Proc::GetPreviousURLBreadcrumbsFromSession());
} else {
return $this->render('//Fregat/config/settingsupdate', ['model' => $model]);
}
}
示例2: actionUpdate
public function actionUpdate($id)
{
$model = $this->findModel($id);
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(Proc::GetPreviousURLBreadcrumbsFromSession());
} else {
return $this->render('update', ['model' => $model]);
}
}
示例3: actionCreate
public function actionCreate($idglaukuchet)
{
$model = new Glprep();
$model->id_glaukuchet = $idglaukuchet;
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(Proc::GetPreviousURLBreadcrumbsFromSession());
} else {
return $this->render('create', ['model' => $model, 'idglaukuchet' => $idglaukuchet]);
}
}
示例4: actionUpdate
/**
* Updates an existing Spisosnovakt model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param string $id
* @return mixed
*/
public function actionUpdate($id)
{
$model = $this->findModel($id);
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(Proc::GetPreviousURLBreadcrumbsFromSession());
} else {
$searchModel = new SpisosnovmaterialsSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('update', ['model' => $model, 'searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
}
}
示例5: actionIndex
public function actionIndex()
{
$searchModel = new LogreportSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
$Importconfig = Importconfig::findOne(1);
if ($Importconfig->load(Yii::$app->request->post()) && $Importconfig->save()) {
return $this->redirect(Proc::GetPreviousURLBreadcrumbsFromSession());
} else {
return $this->render('index', ['Importconfig' => $Importconfig, 'searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
}
}
示例6: actionUpdate
public function actionUpdate($id)
{
$model = $this->findModel($id);
$UploadFile = new UploadDocFile();
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(Proc::GetPreviousURLBreadcrumbsFromSession());
} else {
$searchModelrramat = new RramatDocfilesSearch();
$dataProviderrramat = $searchModelrramat->search(Yii::$app->request->queryParams);
$searchModel = new RecoveryrecieveaktmatSearch();
$dataProvider = $searchModel->searchbase(Yii::$app->request->queryParams);
return $this->render('update', ['model' => $model, 'UploadFile' => $UploadFile, 'dataProvider' => $dataProvider, 'searchModelrramat' => $searchModelrramat, 'dataProviderrramat' => $dataProviderrramat]);
}
}
示例7: actionUpdate
public function actionUpdate($id)
{
$model = $this->findModel($id);
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(Proc::GetPreviousURLBreadcrumbsFromSession());
} else {
$searchModel = new RecoveryrecieveaktSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
$searchModelmat = new RecoveryrecieveaktmatSearch();
$dataProvidermat = $searchModelmat->search(Yii::$app->request->queryParams);
$generalsettings = Fregatsettings::findOne(1);
return $this->render('update', ['model' => $model, 'searchModel' => $searchModel, 'dataProvider' => $dataProvider, 'searchModelmat' => $searchModelmat, 'dataProvidermat' => $dataProvidermat, 'emailfrom' => $generalsettings->fregatsettings_recoverysend_emailfrom, 'emailtheme' => $generalsettings->fregatsettings_recoverysend_emailtheme]);
}
}
示例8: actionUpdate
public function actionUpdate($id)
{
$model = $this->findModel($id);
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(Proc::GetPreviousURLBreadcrumbsFromSession());
} else {
$Request = Yii::$app->request->queryParams;
$searchModelOsn = new TrOsnovSearch();
$dataProviderOsn = $searchModelOsn->search($Request);
$searchModelMat = new TrMatSearch();
$dataProviderMat = $searchModelMat->search($Request);
return $this->render('update', ['model' => $model, 'searchModelOsn' => $searchModelOsn, 'dataProviderOsn' => $dataProviderOsn, 'searchModelMat' => $searchModelMat, 'dataProviderMat' => $dataProviderMat]);
}
}
示例9: actionUpdate
public function actionUpdate($id)
{
$model = $this->findModel($id);
$OnlyBuildEdit = Yii::$app->user->can('EmployeeBuildEdit') && !(Yii::$app->user->can('EmployeeEdit') || Yii::$app->user->can('EmployeeSpecEdit'));
if (Yii::$app->user->can('EmployeeEdit') || Yii::$app->user->can('EmployeeSpecEdit')) {
$Values = Yii::$app->request->post();
} elseif (Yii::$app->user->can('EmployeeBuildEdit')) {
$Values = isset($_POST['Employee']['id_build']) ? ['Employee' => ['id_build' => $_POST['Employee']['id_build'] ? $_POST['Employee']['id_build'] : NULL]] : NULL;
}
if ($model->load($Values) && $model->save()) {
return $this->redirect(Proc::GetPreviousURLBreadcrumbsFromSession());
} else {
return $this->render('update', ['model' => $model, 'OnlyBuildEdit' => $OnlyBuildEdit]);
}
}
示例10: actionUpdate
public function actionUpdate($id)
{
$model = $this->findModel($id);
$Authitemchild = new Authitemchild();
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(Proc::GetPreviousURLBreadcrumbsFromSession());
} else {
$Authitemchild->load(Yii::$app->request->get(), 'Authitemchild');
$Authitemchild->parent = $model->primaryKey;
if ($Authitemchild->validate()) {
$Authitemchild->save(false);
}
$searchModel = new AuthitemchildSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('update', ['model' => $model, 'Authitemchild' => $Authitemchild, 'searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
}
}
示例11: actionUpdate
public function actionUpdate($id)
{
$model = $this->findModel($id);
$Impemployee = new Impemployee();
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(Proc::GetPreviousURLBreadcrumbsFromSession());
} else {
$Impemployee->load(Yii::$app->request->get(), 'Impemployee');
$Impemployee->id_importemployee = $model->primaryKey;
if ($Impemployee->validate()) {
$Impemployee->save(false);
}
$searchModel = new ImpemployeeSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('update', ['model' => $model, 'Impemployee' => $Impemployee, 'searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
}
}
示例12: actionUpdate
public function actionUpdate($id)
{
$model = $this->findModel($id);
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(Proc::GetPreviousURLBreadcrumbsFromSession());
} else {
if (Grupavid::find()->andWhere(['id_grupa' => $model->primaryKey])->count() == 1) {
$Grupavid = Grupavid::find()->andWhere(['id_grupa' => $model->primaryKey])->one();
if ($Grupavid->grupavid_main == 0) {
$Grupavid->grupavid_main = 1;
$Grupavid->save(false);
}
}
$searchModel = new GrupavidSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('update', ['model' => $model, 'searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
}
}
示例13: actionCreate
public function actionCreate()
{
$model = new TrMat();
$Mattraffic = new Mattraffic();
$mattraffic_number_max = NULL;
// Если форма отправлена на сервер, получаем выбранную материальную ценность
$id_mattraffic = isset(Yii::$app->request->post('TrMat')['id_mattraffic']) ? Yii::$app->request->post('TrMat')['id_mattraffic'] : '';
$transaction = Yii::$app->db->beginTransaction();
try {
// Если форма отправлена на сервер, то создать запись перемещения мат цен-ти в mattraffic
if (!empty($id_mattraffic)) {
$Mattrafficcurrent = Mattraffic::findOne($id_mattraffic);
$Mattraffic->attributes = $Mattrafficcurrent->attributes;
$Mattraffic->mattraffic_date = date('Y-m-d');
$Mattraffic->mattraffic_number = isset(Yii::$app->request->post('Mattraffic')['mattraffic_number']) ? Yii::$app->request->post('Mattraffic')['mattraffic_number'] : NULL;
$Mattraffic->mattraffic_tip = 4;
if (isset($Mattraffic->scenarios()['trafficmat'])) {
$Mattraffic->scenario = 'trafficmat';
}
if ($Mattraffic->validate()) {
$Mattraffic->save(false);
$model->load(Yii::$app->request->post());
$model->id_mattraffic = $Mattraffic->mattraffic_id;
}
//Акт установки уже создан и берется из URL параметра
$model->id_installakt = (string) filter_input(INPUT_GET, 'idinstallakt');
}
// Сохраняем модель с отправленными данными и сохраненным mattraffic
if (!$Mattraffic->isNewRecord && $model->save()) {
$transaction->commit();
return $this->redirect(Proc::GetPreviousURLBreadcrumbsFromSession());
} else {
/* // Очистить ошибку id_mattraffic, если есть ошибка по mattraffic_number (Превышено допустимое кол-во для перемещения матер. цен-ти)
if (isset($Mattraffic->errors['mattraffic_number']))
$model->clearErrors('id_mattraffic'); */
$transaction->rollBack();
return $this->render('create', ['model' => $model, 'Mattraffic' => $Mattraffic, 'mattraffic_number_max' => $mattraffic_number_max]);
}
} catch (Exception $e) {
$transaction->rollBack();
throw new Exception($e->getMessage());
}
}
示例14: actionCreate
public function actionCreate()
{
$model = new Osmotrakt();
$InstallTrOsnov = new InstallTrOsnov();
$model->osmotrakt_date = date('Y-m-d');
$InstallTrOsnov->mattraffic_number = 1;
$transaction = Yii::$app->db->beginTransaction();
try {
if ($model->load(Yii::$app->request->post()) && $model->save()) {
$transaction->commit();
return $this->redirect(Proc::GetPreviousURLBreadcrumbsFromSession());
} else {
if ($InstallTrOsnov->load(Yii::$app->request->post()) && $InstallTrOsnov->save($model->id_master)) {
$model->id_tr_osnov = $InstallTrOsnov->mattraffic_trosnov_id;
if ($model->save()) {
$transaction->commit();
return $this->redirect(Proc::GetPreviousURLBreadcrumbsFromSession());
} else {
$transaction->rollBack();
return $this->render('create', ['model' => $model, 'InstallTrOsnov' => $InstallTrOsnov]);
}
} else {
if (empty($InstallTrOsnov->id_mattraffic)) {
$InstallTrOsnov->clearErrors();
} elseif (empty($model->id_tr_osnov) && !empty($InstallTrOsnov->id_mattraffic)) {
$model->clearErrors('id_tr_osnov');
}
$transaction->rollBack();
return $this->render('create', ['model' => $model, 'InstallTrOsnov' => $InstallTrOsnov]);
}
}
} catch (Exception $e) {
$transaction->rollBack();
throw new Exception($e->getMessage());
}
}
示例15: actionUpdate
public function actionUpdate($id)
{
$model = $this->findModel($id);
$Mattraffic = Mattraffic::find()->andWhere(['id_material' => $model->material_id])->andWhere(['in', 'mattraffic_tip', [1, 2]])->orderBy('mattraffic_date desc, mattraffic_id desc')->one();
$searchModel_mattraffic = new MattrafficSearch();
$dataProvider_mattraffic = $searchModel_mattraffic->searchformaterialmattraffic(Yii::$app->request->queryParams);
$searchModel_recovery = new OsmotraktSearch();
$dataProvider_recovery = $searchModel_recovery->searchformaterialkarta(Yii::$app->request->queryParams);
$searchModel_recoverymat = new TrMatOsmotrSearch();
$dataProvider_recoverymat = $searchModel_recoverymat->searchformaterialkarta(Yii::$app->request->queryParams);
$searchModel_recoverysend = new RecoveryrecieveaktSearch();
$dataProvider_recoverysend = $searchModel_recoverysend->searchformaterialkarta(Yii::$app->request->queryParams);
$searchModel_recoverysendmat = new RecoveryrecieveaktmatSearch();
$dataProvider_recoverysendmat = $searchModel_recoverysendmat->searchformaterialkarta(Yii::$app->request->queryParams);
$searchModel_mattraffic_contain = new TrMatSearch();
$dataProvider_mattraffic_contain = $searchModel_mattraffic_contain->searchformaterialcontain(Yii::$app->request->queryParams);
if (Yii::$app->user->can('MaterialEdit') && $model->load(Yii::$app->request->post()) && $model->save() && $Mattraffic->load(Yii::$app->request->post()) && $Mattraffic->save()) {
return $this->redirect(Proc::GetPreviousURLBreadcrumbsFromSession());
} else {
return $this->render('update', ['model' => $model, 'Mattraffic' => $Mattraffic, 'searchModel_mattraffic' => $searchModel_mattraffic, 'dataProvider_mattraffic' => $dataProvider_mattraffic, 'searchModel_recovery' => $searchModel_recovery, 'dataProvider_recovery' => $dataProvider_recovery, 'searchModel_recoverymat' => $searchModel_recoverymat, 'dataProvider_recoverymat' => $dataProvider_recoverymat, 'searchModel_recoverysend' => $searchModel_recoverysend, 'dataProvider_recoverysend' => $dataProvider_recoverysend, 'searchModel_recoverysendmat' => $searchModel_recoverysendmat, 'dataProvider_recoverysendmat' => $dataProvider_recoverysendmat, 'searchModel_mattraffic_contain' => $searchModel_mattraffic_contain, 'dataProvider_mattraffic_contain' => $dataProvider_mattraffic_contain]);
}
}