Пример #1
0
 public function edit(Request $request, $id)
 {
     $entity = parent::edit($request, $id);
     if ($idArticleCategory = $request->request->get('id_article_category')) {
         $categoryEntity = $this->categoryRepository->find($idArticleCategory);
         $entity->setCategory($categoryEntity);
     }
     if ($idAuthor = $request->request->get('id_author')) {
         $userEntity = $this->userRepository->find($idAuthor);
         $entity->setAuthor($userEntity);
     }
     return $entity;
 }
 public function __construct(CategoryRepository $categoryRepository)
 {
     parent::__construct($categoryRepository);
 }
Пример #3
0
 public function __construct(NewsRepository $newsRepository)
 {
     parent::__construct($newsRepository);
 }