src/Sulu/Bundle/MediaBundle/Api/Media.php
public function addCategory(CategoryEntity $category)
    {
        $fileVersion = $this->getFileVersion();
        $fileVersion->addCategory($category);

        return $this;
    }
public function addCategory(CategoryEntity $category)
    {
        $fileVersion = $this->getFileVersion();
        $fileVersion->addCategory($category);

        return $this;
    }
public function addCategory ( CategoryEntity $ category ) { $ fileVersion = $ this -> getFileVersion ( ) ; $ fileVersion -> addCategory ( $ category ) ; return $ this ; }
Adds a category to the entity.

@param CategoryEntity $category
Adds a category to the entity .