src/Phlexible/Bundle/MetaSetBundle/Controller/SetsController.php
public function listAction()
    {
        $metaSetManager = $this->get('phlexible_meta_set.meta_set_manager');
        $metaSet = $metaSetManager->findAll();

        $data = [];
        foreach ($metaSet as $set) {
            /* @var $set MetaSetInterface */

            $data[] = [
                'id' => $set->getId(),
                'name' => $set->getName(),
                'createdAt' => $set->getCreatedAt() ? $set->getCreatedAt()->format('Y-m-d H:i:s') : null,
                'createUser' => $set->getCreateUser(),
                'modifiedAt' => $set->getModifiedAt() ? $set->getModifiedAt()->format('Y-m-d H:i:s') : null,
                'modifyUser' => $set->getModifyUser(),
                'revision' => $set->getRevision(),
            ];
        }

        return new JsonResponse(['sets' => $data]);
    }
public function listAction()
    {
        $metaSetManager = $this->get('phlexible_meta_set.meta_set_manager');
        $metaSet = $metaSetManager->findAll();

        $data = [];
        foreach ($metaSet as $set) {
            /* @var $set MetaSetInterface */

            $data[] = [
                'id' => $set->getId(),
                'name' => $set->getName(),
                'createdAt' => $set->getCreatedAt() ? $set->getCreatedAt()->format('Y-m-d H:i:s') : null,
                'createUser' => $set->getCreateUser(),
                'modifiedAt' => $set->getModifiedAt() ? $set->getModifiedAt()->format('Y-m-d H:i:s') : null,
                'modifyUser' => $set->getModifyUser(),
                'revision' => $set->getRevision(),
            ];
        }

        return new JsonResponse(['sets' => $data]);
    }
public function listAction ( ) { $ metaSetManager = $ this -> get ( 'phlexible_meta_set.meta_set_manager' ) ; $ metaSet = $ metaSetManager -> findAll ( ) ; $ data = [ ] ; foreach ( $ metaSet as $ set ) { /* @var $set MetaSetInterface */ $ data [ ] = [ 'id' => $ set -> getId ( ) , 'name' => $ set -> getName ( ) , 'createdAt' => $ set -> getCreatedAt ( ) ? $ set -> getCreatedAt ( ) -> format ( 'Y-m-d H:i:s' ) : null , 'createUser' => $ set -> getCreateUser ( ) , 'modifiedAt' => $ set -> getModifiedAt ( ) ? $ set -> getModifiedAt ( ) -> format ( 'Y-m-d H:i:s' ) : null , 'modifyUser' => $ set -> getModifyUser ( ) , 'revision' => $ set -> getRevision ( ) , ] ; } return new JsonResponse ( [ 'sets' => $ data ] ) ; }
List sets.

@return JsonResponse
@Route("/list", name="metasets_sets_list")
List sets .