src/Sulu/Bundle/MediaBundle/Api/Media.php
public function getCategories()
    {
        $apiCategories = [];
        $fileVersion = $this->getFileVersion();
        $categories = $fileVersion->getCategories();

        return array_map(function(CategoryEntity $category) {
            return $category->getId();
        }, $categories->toArray());
    }
public function getCategories()
    {
        $apiCategories = [];
        $fileVersion = $this->getFileVersion();
        $categories = $fileVersion->getCategories();

        return array_map(function(CategoryEntity $category) {
            return $category->getId();
        }, $categories->toArray());
    }
public function getCategories ( ) { $ apiCategories = [ ] ; $ fileVersion = $ this -> getFileVersion ( ) ; $ categories = $ fileVersion -> getCategories ( ) ; return array_map ( function ( CategoryEntity $ category ) { return $ category -> getId ( ) ; } , $ categories -> toArray ( ) ) ; }
Returns the categories of the media.

@VirtualProperty
@SerializedName("categories")

@return Category[]
Returns the categories of the media .