Displays a form to create a new Author entity.

@Route("/new", name="manage_author_new")
@Template()
485871
public function newAction()
    {
        $entity = new Author();
        $form   = $this->createForm(new AuthorType(), $entity);

        return array(
            'entity' => $entity,
            'form'   => $form->createView(),
        );
    }
546376
public function actionCreate()
	{
		$model=new Post;
		if(isset($_POST['Post']))
		{
			$model->attributes=$_POST['Post'];
			if($model->save())
				$this->redirect(array('view','id'=>$model->id));
		}

		$this->render('create',array(
			'model'=>$model,
		));
	}
1365307
public function newAction()
    {
        $entity = new Page();
        $form = $this->createCreateForm($entity);

        return array(
            'entity' => $entity,
            'form' => $form->createView(),
        );
    }
136859
public function createAction()
    {
        /**
         * @var $form \Zend\Form\Form
         */
        $form = $this->getCreateForm();

        if ($this->getRequest()->isPost()) {
            $form->setData($this->getRequest()->getPost());

            if ($form->isValid()) {
                $objectManager = $this->getServiceLocator()->get('Doctrine\ORM\EntityManager');
                $entity = $this->getEntity();
                $hydrator = new DoctrineHydrator($objectManager);
                $hydrator->hydrate($form->getData(), $entity);
                $objectManager->persist($entity);
                $objectManager->flush();
                $controller = explode('/', $this->getRequest()->getUri()->getPath())[2];
                if (!$this->getRequest()->isXmlHttpRequest()) {
                    return $this->redirect()->toRoute(null, ['controller' => $controller]);
                }
                return;
            } else {
                $this->getResponse()->setStatusCode(400);
            }
        }
        $viewModel = $this->getViewModel();
        $viewModel->setTerminal($this->getRequest()->isXmlHttpRequest());

        return $viewModel->setVariables(['form' => $form]);
    }
586576
public function newAction()
    {
        $user = new User();
        $form   = $this->createCreateForm($user);

        return $this->render('ChillMainBundle:User:new.html.twig', array(
            'entity' => $user,
            'form'   => $form->createView(),
        ));
    }
785700
public function create()
	{
		$class = __NAMESPACE__ . '\\Scaffolding\\' . ucfirst($this->type);

		if (class_exists($class))
		{
			$obj = new $class($this->output, $this->arguments);
		}
		else
		{
			if (empty($this->type))
			{
				$this->output->error('Error: Sorry, scaffolding can\'t create nothing/everything. Try telling it what you want to create.');
			}
			else
			{
				$this->output->error('Error: Sorry, scaffolding doesn\'t know how to create a ' . $this->type);
			}
		}

		// Get author name and email - we'll go ahaed and retrieve for all create calls
		$user_name  = Config::get('user_name');
		$user_email = Config::get('user_email');

		if (!$user_name || !$user_email)
		{
			$this->output
			     ->addSpacer()
			     ->addLine('You can specify your name and email via:')
			     ->addLine(
					'muse configuration set --user_name="John Doe"',
					array(
						'indentation' => '2',
						'color'       => 'blue'
					)
				)
				->addLine(
					'muse configuration set --user_email=john.doe@gmail.com',
					array(
						'indentation' => '2',
						'color'       => 'blue'
					)
				)
				->addSpacer()
				->error("Error: failed to retrieve author name and/or email.");
		}

		$obj->addReplacement('author_name', $user_name)
			->addReplacement('author_email', $user_email);

		// Call the construct method
		$obj->construct();
	}
918444
public function newAction()
    {
        $entity = new Category();
        $form = $this->createCreateForm($entity);

        return array(
            'entity' => $entity,
            'form' => $form->createView(),
        );
    }
136876
public function newAction()
        {

            $oCustomer = new Customer();
            $form      = $this->createCreateForm($oCustomer);

            return $this->render('SlashworksAppBundle:Customer:new.html.twig', array(
                'entity' => $oCustomer,
                'form'   => $form->createView(),
            ));
        }
825383
public function newAction() {

        $entity = new Role();

        $form = $this->createCreateForm($entity);

        return array(
            'entity' => $entity,
            'form' => $form->createView(),
        );
    }
319929
public function create(Request $request)
    {
        if (!$this->can('create-' . Str::plural($this->slug), auth()->user()->id)) {
            abort(404);
        }

        return view('laramin::models.add-edit')
            ->withStatus('Add')
            ->withColumns($this->columns())
            ->withType($this->type);
    }
1347706
public function newAction()
    {
        $entity = new Brand();
        $form   = $this->createCreateForm($entity);

        return array(
            'entity' => $entity,
            'form'   => $form->createView(),
        );
    }
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'),
        ]);
    }
1082865
public function newAction()
        {

            $oRemoteApp = new RemoteApp();
            $oRemoteApp->setApiUrl("swControl/");
            $oRemoteApp->setActivated(true);
            $oRemoteApp->setIncludelog(true);
            $oRemoteApp->setNotificationRecipient($this->getUser()->getEmail());
            $oRemoteApp->setNotificationSender($this->getUser()->getEmail());
            $oRemoteApp->setNotificationChange(true);
            $oRemoteApp->setNotificationError(true);
            $form = $this->createCreateForm($oRemoteApp);

            return $this->render('SlashworksAppBundle:RemoteApp:new.html.twig', array(
                'entity' => $oRemoteApp,
                'form'   => $form->createView(),
            ));
        }
1289014
public function newAction(Request $request)
    {
        $entity = new Translation();
        $form = $this->createForm('CoreBundle\Form\TranslationType', $entity);
        
        $form->handleRequest($request);

        if ($form->isSubmitted() && $form->isValid()) {

            //Create entry in DB
            $this->updateTranslation($entity);
            
            $this->get('session')->getFlashBag()->add('success', 'translation.created');
            
            return $this->redirectToRoute('core_translation_index');
        }

        return $this->render('CoreBundle:Translation:new.html.twig', array(
            'translation' => $entity,
            'form' => $form->createView(),
        ));
    }
831814
public function create_new($request)
    {
        if (!$this->canCreate()) {
            return $this->httpError(403, "You do not have permission to create new " . $this->getPluralName());
        }
        $this->addCrumb('Create new ' . $this->getSingularName());
        return $this->customise(['Form' => $this->CreationForm()]);
    }
632188
public function create()
    {
        $roles = $this->roleRepositoryInterface->getAll()
                                               ->lists('name', 'slug');

        return $this->view('users.create')
                    ->with('roles', $roles);
    }
980690
public function newAction()
    {
        $entity = new MessageType();
        $form   = $this->createCreateForm($entity);

        return $this->render(
            'BisonLabSakonninBundle:MessageType:edit.html.twig', array(
            'entity' => $entity,
            'edit_form'   => $form->createView(),
        ));
    }