Example #1
0
 public function __construct($id = false, $table = null, $ds = null)
 {
     parent::__construct($id, $table, $ds);
     App::uses('Hurad', 'Lib');
     Hurad::applyProperty('behavior', $this);
 }
Example #2
0
 private function checkOptionsAuthorization($user)
 {
     switch ($user['role']) {
         case "administrator":
             return Hurad::allowAuth();
             break;
         case "editor":
         case "author":
         case "user":
             return Hurad::denyAuth();
             break;
     }
 }
Example #3
0
<?php

App::uses('Akismet', 'Akismet.Lib');
HuradNavigation::addSubMenu('options', 'akismet', __d('hurad', 'Akismet Configuration'), ['admin' => true, 'plugin' => 'akismet', 'controller' => 'akismet'], 'manage_options');
Hurad::applyBehavior('Comment', 'Akismet.Akismet');