Ejemplo n.º 1
0
 /**
  * Handle the command.
  *
  * @param PostFormBuilder $builder
  */
 public function handle(PostFormBuilder $builder)
 {
     $builder->setEntry($this->post->getId());
     $this->builder->addForm('post', $builder);
 }
 /**
  * Handle the command.
  *
  * @param TypeRepositoryInterface $types
  * @param PostFormBuilder         $builder
  * @param Request                 $request
  */
 public function handle(TypeRepositoryInterface $types, PostFormBuilder $builder, Request $request)
 {
     $this->builder->addForm('post', $builder->setType($types->find($request->get('type'))));
 }
Ejemplo n.º 3
0
 /**
  * Handle the form fields.
  *
  * @param Guard           $auth
  * @param PostFormBuilder $builder
  */
 public function handle(Guard $auth, PostFormBuilder $builder)
 {
     $builder->setFields(['*', 'author' => ['config' => ['default_value' => $auth->id()]], 'publish_at' => ['config' => ['default_value' => 'now']]]);
 }