/** * @inheritdoc */ function create($args) { $category = new Category(); $category->setName($args['name']); $category->setCollection($this->getCollection($args['collection'])); $category->setPicture($this->createImage($args['picture'])); return $category; }