Jump to content

ACPRestrict в функции


TemKa_SD
 Share

Recommended Posts

Здравствуйте. С правами в админцентре всё понятно, единственное скажите, как в функцию добавить, например add

 

    protected function add()
   {
       $form = new \IPS\Helpers\Form();
       $form->addHeader( 'sharedstats_stats_announce_announce_add' );
       $form->add( new \IPS\Helpers\Form\TextArea( 'sharedstats_stats_announce_announce_add', null, true, array( 'maxLength' => 60 )));

       if ( $values = $form->values() )
       {
        $ann = new \IPS\sharedstats\Records\Announce;
        $ann->text = $values['sharedstats_stats_announce_announce_add'];
        $ann->save();

        \IPS\Output::i()->redirect(\IPS\Http\Url::internal( 'app=sharedstats&module=stats&controller=announce', 'admin' ), 'sharedstats_stats_announce_announce_added');
       }

       \IPS\Output::i()->output = $form;
   }

 

Искал по ключам в приложении форум, там вообще странность, ключи созданы, а в приложении нигде не применяются ))) : http://prntscr.com/lcwyv6 в чем прикол?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...