Jump to content
Дизайн и модификация IPS Community IPBSkinsBETA
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
TemKa_SD

ACPRestrict в функции

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 в чем прикол?

Share this post


Link to post
Share on other sites
\IPS\Dispatcher::i()->checkAcpPermission('some_key');

Share this post


Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...