Creates a new WarehouseVoucherItems model.
If creation is successful, the browser will be redirected to the 'view' page.
@return mixed
542125
public function actionCreate()
    {
        $model = new WarehouseVoucherItems();

        if ($model->loadAll(request()->post()) && $model->saveAll()) {
            return $this->redirect(['view', 'id' => $model->id]);
        } else {
            return $this->render('create', [
                'model' => $model,
            ]);
        }
    }
671327
public function actionCreate()
    {
        $model = new Question();
        if ($model->load(Yii::$app->request->post()) && $model->save() != null) {
            Yii::$app->session->setFlash('success', 'question Submitted');
            return $this->redirect(['view', 'id' => $model->id]);
        }
        return $this->render('create', ['model' => $model]);
    }
411901
public function actionCreate()
    {
        $model = $this->module->model('User');
        $model->loadDefaultValues();
        $model->status = $model::STATUS_DELETED;
        $model->scenario = $model::SCENARIO_CREATE;
        $model->pageSize = intval($this->module->params['pageSizeAdmin']);

        if ($model->load(Yii::$app->request->post()) && $model->save()) {
            return $this->redirect(['index', 'page' => $model->page, 'id' => $model->id]);
        } else {
            return $this->render('create', [
                'model' => $model,
                'rolesModels' => [],
            ]);
        }
    }
872182
public function actionCreate()
    {
        $model = new AuthItem();

        if ($model->loadAll(request()->post()) && $model->saveAll()) {
            return $this->redirect(['view', 'id' => $model->name]);
        } else {
            return $this->render('create', [
                'model' => $model,
            ]);
        }
    }
1021883
public function actionCreate()
    {
        $model = new BizRule(null);
        if ($model->load(Yii::$app->request->post()) && $model->save()) {
            Helper::invalidate();

            return $this->redirect(['view', 'id' => $model->name]);
        } else {
            return $this->render('create', ['model' => $model,]);
        }
    }
1137424
protected function createModel()
    {
        if ($this->model instanceof \Gems_Model_StaffModel) {
            $model = $this->model;
        } else {
            $model = $this->loader->getModels()->getStaffModel();
            $model->applyBrowseSettings();
        }

        return $model;
    }
511134
public function actionCreate()
    {
        $model = Yii::createObject($this->getModelClass());

        if ($model->load(Yii::$app->request->post()) && $model->save()) {
            \Yii::$app->getSession()->setFlash('success', $this->getFlashMsg('success'));
            return $this->redirect(ArrayHelper::merge(['view'], $model->getPrimaryKey(true)));
        } else {
            if ($model->hasErrors()) {
                \Yii::$app->getSession()->setFlash('error', $this->getFlashMsg('error'));
            }
            return $this->render($this->viewID, [
                'model' => $model,
            ]);
        }
    }
245308
protected function createModel()
    {
        $model = new SearchPanelModel();

        $model->searchControls = $this->createSearchControls();

        $model->urlStateNames = $this->getUrlStateNames($model->searchControls);

        // Pass through of searchedEvent
        $this->searchedEvent = $model->searchedEvent;

        return $model;
    }
339652
public function newAction()
    {
        $form = $this->container->get('vespolina.product.form');

        return $this->container->get('templating')->renderResponse('VespolinaCommerceBundle:Product:new.html.'.$this->getEngine(), array(
            'form'                   => $form->createView(),
            'configuredOptionGroups' => $this->getConfiguredOptionsGroups(),
            'product'  => $this->container->get('vespolina.product_manager')->createProduct(),
       ));
    }
1372902
public function create()
    {
        $record = $this->getNewModelInstance();

        $fields = array_only(
            $this->modelInformation->form->fields,
            $this->getRelevantFormFieldKeys(true)
        );

        $this->checkListParents(false);

        $values = $this->getFormFieldValuesFromModel($record, array_keys($fields));
        $errors = $this->getNormalizedFormFieldErrors();

        $renderedFields = $this->renderedFormFieldStrategies($record, $fields, $values, $errors);

        return view($this->getCreateView(), [
            'moduleKey'           => $this->moduleKey,
            'routePrefix'         => $this->routePrefix,
            'permissionPrefix'    => $this->permissionPrefix,
            'model'               => $this->modelInformation,
            'record'              => $record,
            'recordReference'     => null,
            'creating'            => true,
            'fields'              => $fields,
            'fieldStrategies'     => $renderedFields,
            'values'              => $values,
            'fieldErrors'         => $errors,
            'activeTab'           => $this->getActiveTab(),
            'errorsPerTab'        => $this->getErrorCountsPerTabPane(),
            'hasActiveListParent' => (bool) $this->listParentRelation,
            'topListParentOnly'   => $this->showsTopParentsOnly(),
            'listParents'         => $this->listParents,
        ]);
    }
1374701
public function actionCreate()
    {
        $model = new AuthItem(null);
        $model->type = Item::TYPE_ROLE;
        if ($model->load(Yii::$app->getRequest()->post()) && $model->save()) {
            AccessHelper::refeshAuthCache();
            return $this->redirect(['view', 'id' => $model->name]);
        } else {
            return $this->render('create', ['model' => $model,]);
        }
    }
1184893
public function newAction()
    {
        $productitemfield = new ProductItemField();
        $form = $this->createForm($this->get("amulen.shop.form.product.item.field"), $productitemfield);

        return array(
            'productitemfield' => $productitemfield,
            'form' => $form->createView(),
        );
    }
289254
public function create()
	{
		$view = $this->getView();
		$data['product.lists.siteid'] = $this->getContext()->getLocale()->getSiteId();
		$data = array_replace_recursive( $this->toArray( $view->item ), $view->param( 'download', [] ) );

		$view->downloadData = $data;
		$view->downloadBody = '';

		foreach( $this->getSubClients() as $client ) {
			$view->downloadBody .= $client->create();
		}

		return $this->render( $view );
	}
423041
public function create()
    {
        // Is this user allowed to do this?
        if (!$this->repository->isUserAllowed('create'))
        {
            Session::flash('status_code', 400 );
            $message = "You are not allowed to create ".$this->table_type_plural;
            Session::flash('message', $message);
            return view('formhandling::warnings/' . config('lasallecmsadmin.admin_template_name') . '/user_not_allowed', [
                'package_title'        => $this->package_title,
                'table_type_plural'    => $this->table_type_plural,
                'table_type_singular'  => $this->table_type_singular,
                'resource_route_name'  => $this->resource_route_name,
                'HTMLHelper'           => HTMLHelper::class,
            ]);
        }

        return view('formhandling::lookuptables/' . config('lasallecmsadmin.admin_template_name') . '/create', [
            'package_title'        => $this->package_title,
            'table_type_plural'    => $this->table_type_plural,
            'table_type_singular'  => $this->table_type_singular,
            'resource_route_name'  => $this->resource_route_name,
            'DatesHelper'          => DatesHelper::class,
            'HTMLHelper'           => HTMLHelper::class,
        ]);
    }
317247
public function actionCreate()
    {
        $model = new Post();
        $model->load(Yii::$app->request->get());

        if ($model->load(Yii::$app->request->post()) && $model->save()) {
            Yii::$app->session->setFlash('postSaved');
            return $this->redirect(['update', 'id' => $model->id]);
        }

        if ($model->type->show_category) {
            $model->setScenario('required_category');
        }

        return $this->render('create', [
            'model' => $model,
        ]);
    }
1004401
public function create() {

        // Is this user allowed to do this?
        if (!$this->repository->isUserAllowed('create')) {
            Session::flash('status_code', 400 );
            $message = "You are not allowed to create ".$this->model->table;
            Session::flash('message', $message);
            return view('formhandling::warnings/' . config('lasallecmsadmin.admin_template_name') . '/user_not_allowed', [
                'package_title'                => $this->model->package_title,
                'table_type_plural'            => $this->model->table,
                'resource_route_name'          => $this->model->resource_route_name,
                'table_type_singular'          => strtolower($this->model->model_class),
                'HTMLHelper'                   => HTMLHelper::class,
            ]);
        }

        return view('lasallecmsemail::admin/emailhandling/create',
        [
            'user'                             => Auth::user(),
            'repository'                       => $this->repository,
            'package_title'                    => $this->model->package_title,
            'table_name'                       => $this->model->table,
            'model_class'                      => $this->model->model_class,
            'resource_route_name'              => $this->model->resource_route_name,
            'DatesHelper'                      => DatesHelper::class,
            'HTMLHelper'                       => HTMLHelper::class,
            'Config'                           => Config::class,
            'admin_template_name'              => config('lasallecmsadmin.admin_template_name'),
        ]);
    }
396621
public function actionCreate()
    {
        $model = new Meta();

        if ($model->load(Yii::$app->request->post()) && $model->save()) {
            return $this->redirect(['view', 'id' => $model->id_meta]);
        } else {
            return $this->render('create', [
                'model' => $model,
            ]);
        }
    }