public function create($context = null)
    {
        try {
            $this->context = strlen($context) ? $context : $this->getConfig('create[context]', self::CONTEXT_CREATE);
            $this->controller->pageTitle = $this->controller->pageTitle ?: $this->getLang(
                "{$this->context}[title]",
                'backend::lang.form.create_title'
            );

            $model = $this->controller->formCreateModelObject();
            $model = $this->controller->formExtendModel($model) ?: $model;

            $this->initForm($model);
        }
        catch (Exception $ex) {
            $this->controller->handleError($ex);
        }
    }
public function create($context = null)
    {
        try {
            $this->context = strlen($context) ? $context : $this->getConfig('create[context]', self::CONTEXT_CREATE);
            $this->controller->pageTitle = $this->controller->pageTitle ?: $this->getLang(
                "{$this->context}[title]",
                'backend::lang.form.create_title'
            );

            $model = $this->controller->formCreateModelObject();
            $model = $this->controller->formExtendModel($model) ?: $model;

            $this->initForm($model);
        }
        catch (Exception $ex) {
            $this->controller->handleError($ex);
        }
    }
public function create ( $ context = null ) { try { $ this -> context = strlen ( $ context ) ? $ context : $ this -> getConfig ( 'create[context]' , self :: CONTEXT_CREATE ) ; $ this -> controller -> pageTitle = $ this -> controller -> pageTitle ? : $ this -> getLang ( "{$this->context}[title]" , 'backend::lang.form.create_title' ) ; $ model = $ this -> controller -> formCreateModelObject ( ) ; $ model = $ this -> controller -> formExtendModel ( $ model ) ? : $ model ; $ this -> initForm ( $ model ) ; } catch ( Exception $ ex ) { $ this -> controller -> handleError ( $ ex ) ; } }
Controller "create" action used for creating new model records.

@param string $context Form context
@return void
Controller create action used for creating new model records .