public function create()
    {
        /**
         * @var Category $category
         */
        $classNamespace = $this->getEntityNamespace();
        $category = new $classNamespace();
        $category
            ->setSubcategories(new ArrayCollection())
            ->setRoot(true)
            ->setPosition(0)
            ->setEnabled(true)
            ->setCreatedAt($this->now());

        return $category;
    }
public function create()
    {
        /**
         * @var Category $category
         */
        $classNamespace = $this->getEntityNamespace();
        $category = new $classNamespace();
        $category
            ->setSubcategories(new ArrayCollection())
            ->setRoot(true)
            ->setPosition(0)
            ->setEnabled(true)
            ->setCreatedAt($this->now());

        return $category;
    }
public function create ( ) { /**
         * @var Category $category
         */ $ classNamespace = $ this -> getEntityNamespace ( ) ; $ category = new $ classNamespace ( ) ; $ category -> setSubcategories ( new ArrayCollection ( ) ) -> setRoot ( true ) -> setPosition ( 0 ) -> setEnabled ( true ) -> setCreatedAt ( $ this -> now ( ) ) ; return $ category ; }
Creates an instance of Category.

@return Category New Category entity
Creates an instance of Category .