コード例 #1
0
ファイル: EmailAdmin.php プロジェクト: nathix86/bcp-website
 /**
  * {@inheritdoc}
  */
 public function getBatchActions()
 {
     $actions = parent::getBatchActions();
     if ($this->hasRole('ROLE_EMAIL_ADMIN')) {
         $actions['send_email'] = array('label' => 'batch_action_send_email', 'translation_domain' => $this->translationDomain, 'ask_confirmation' => true);
     }
     return $actions;
 }
コード例 #2
0
ファイル: PostAdmin.php プロジェクト: nathix86/bcp-website
 /**
  * {@inheritdoc}
  */
 public function getBatchActions()
 {
     $actions = parent::getBatchActions();
     if ($this->hasRole('ROLE_POST_ADMIN')) {
         $actions['newsletter'] = array('label' => 'batch_action_newsletter', 'translation_domain' => $this->translationDomain, 'ask_confirmation' => true);
         /*$actions['facebook'] = array(
                         'label' => 'batch_action_facebook',
                         'translation_domain' => $this->translationDomain,
                         'ask_confirmation' => true
                     );
         
                     $actions['newsletter_and_facebook'] = array(
                         'label' => 'batch_action_newsletter_and_facebook',
                         'translation_domain' => $this->translationDomain,
                         'ask_confirmation' => true
                     );*/
     }
     return $actions;
 }