Acl\AclExtras::acoSync PHP Method

acoSync() public method

Sync the ACO table
public acoSync ( array $params = [] ) : void
$params array An array of parameters
return void
    public function acoSync($params = [])
    {
        $this->_clean = true;
        $this->acoUpdate($params);
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * Build action.
  *
  * @param string $type
  * @trows BadRequestException
  * @return \Cake\Network\Response|null
  */
 public function build($type = 'synchronize')
 {
     if (!Arr::in($type, $this->_buildTypes)) {
         throw new BadRequestException(__d('community', 'Unable to find build type "{0}"', $type));
     }
     $AclExtras = new AclExtras();
     $AclExtras->startup($this);
     if ($type == 'synchronize') {
         $AclExtras->acoSync();
     } else {
         $AclExtras->acoUpdate();
     }
     return $this->redirect(['action' => 'permissions']);
 }