Exemplo n.º 1
0
 protected function beforeDuplicate(&$duplicate)
 {
     if (!empty($duplicate->acl_id)) {
         $oldAcl = \GO\Base\Model\Acl::model()->findByPk($duplicate->acl_id);
         $duplicate->setNewAcl();
         $newAcl = \GO\Base\Model\Acl::model()->findByPk($duplicate->acl_id);
         $oldAcl->copyPermissions($newAcl);
     }
     return parent::beforeDuplicate($duplicate);
 }