Exemplo n.º 1
0
 /**
  * Check button access.
  *
  * @param string $name   The button name.
  * @param array  $button The button config array.
  *
  * @return  boolean Allow this button or not.
  */
 protected function checkAccess($name, $button)
 {
     // No access set, means yes.
     if (!isset($button['access'])) {
         return true;
     } elseif (is_string($button['access'])) {
         return $this->access->get($button['access']);
     }
     // If we get FALSE, just return it.
     return $button['access'];
 }