MediaAdmin/EventSubscriber/AddChoiceSiteShareMediaSubscriber.php
public function addChoiceSite(SiteFormEvent $event)
    {
        $builder = $event->getBuilder();
        $subGroupRender = $builder->getAttribute('sub_group_render');
        $subGroupRender = array_merge($subGroupRender, array(
            'media' => array(
                'rank' => 2,
                'label' => 'open_orchestra_media_admin.form.site.sub_group.media',
            ),
        ));
        $builder->setAttribute('sub_group_render', $subGroupRender);

        $builder->addEventSubscriber($this->mediaLibrarySharingSubscriber);
    }
public function addChoiceSite(SiteFormEvent $event)
    {
        $builder = $event->getBuilder();
        $subGroupRender = $builder->getAttribute('sub_group_render');
        $subGroupRender = array_merge($subGroupRender, array(
            'media' => array(
                'rank' => 2,
                'label' => 'open_orchestra_media_admin.form.site.sub_group.media',
            ),
        ));
        $builder->setAttribute('sub_group_render', $subGroupRender);

        $builder->addEventSubscriber($this->mediaLibrarySharingSubscriber);
    }
public function addChoiceSite ( SiteFormEvent $ event ) { $ builder = $ event -> getBuilder ( ) ; $ subGroupRender = $ builder -> getAttribute ( 'sub_group_render' ) ; $ subGroupRender = array_merge ( $ subGroupRender , array ( 'media' => array ( 'rank' => 2 , 'label' => 'open_orchestra_media_admin.form.site.sub_group.media' , ) , ) ) ; $ builder -> setAttribute ( 'sub_group_render' , $ subGroupRender ) ; $ builder -> addEventSubscriber ( $ this -> mediaLibrarySharingSubscriber ) ; }
add choice site to site form

@param SiteFormEvent $event
add choice site to site form