src/Sulu/Bundle/CategoryBundle/Category/CategoryManager.php
public function getApiObject($category, $locale)
    {
        if ($category instanceof CategoryWrapper) {
            $category = $category->getEntity();
        }
        if (!$category instanceof CategoryInterface) {
            return;
        }

        return new CategoryWrapper($category, $locale);
    }
public function getApiObject($category, $locale)
    {
        if ($category instanceof CategoryWrapper) {
            $category = $category->getEntity();
        }
        if (!$category instanceof CategoryInterface) {
            return;
        }

        return new CategoryWrapper($category, $locale);
    }
public function getApiObject ( $ category , $ locale ) { if ( $ category instanceof CategoryWrapper ) { $ category = $ category -> getEntity ( ) ; } if ( ! $ category instanceof CategoryInterface ) { return ; } return new CategoryWrapper ( $ category , $ locale ) ; }
Returns an API-Object for a given category-entity. The API-Object wraps the entity
and provides neat getters and setters. If the given object is already an API-object,
the associated entity is used for wrapping.

@param $category
@param string $locale

@return null|CategoryWrapper
Returns an API - Object for a given category - entity . The API - Object wraps the entity and provides neat getters and setters . If the given object is already an API - object the associated entity is used for wrapping .