/** * Get options for dropdown boxes. * @param string $name Name of options to return, ie: 'columns', 'type', 'status' * @param mixed $parent Parent name/ID of options to return if data is in hierarchical format. (ie: Province) * @return array */ function getOptions($name, $parent = NULL) { if ($name == 'columns' and (!$this->getPermissionObject()->Check('punch', 'enabled') or !($this->getPermissionObject()->Check('punch', 'view') or $this->getPermissionObject()->Check('punch', 'view_child')))) { $name = 'list_columns'; } return parent::getOptions($name, $parent); }
/** * Get options for dropdown boxes. * @param string $name Name of options to return, ie: 'columns', 'type', 'status' * @param mixed $parent Parent name/ID of options to return if data is in hierarchical format. (ie: Province) * @return array */ function getOptions($name, $parent = NULL) { if ($name == 'columns' and (!$this->getPermissionObject()->Check('recurring_schedule_template', 'enabled') or !($this->getPermissionObject()->Check('recurring_schedule_template', 'view') or $this->getPermissionObject()->Check('recurring_schedule_template', 'view_own') or $this->getPermissionObject()->Check('recurring_schedule_template', 'view_child')))) { $name = 'list_columns'; } return parent::getOptions($name, $parent); }
/** * Get options for dropdown boxes. * @param string $name Name of options to return, ie: 'columns', 'type', 'status' * @param mixed $parent Parent name/ID of options to return if data is in hierarchical format. (ie: Province) * @return array */ function getOptions($name, $parent = NULL) { if ($name == 'columns') { $name = 'list_columns'; } return parent::getOptions($name, $parent); }
/** * Get options for dropdown boxes. * @param string $name Name of options to return, ie: 'columns', 'type', 'status' * @param mixed $parent Parent name/ID of options to return if data is in hierarchical format. (ie: Province) * @return array */ function getOptions($name, $parent = NULL) { if ($name == 'user_columns') { $uf = TTnew('UserFactory'); if ($this->getPermissionObject()->Check('user', 'enabled') and $this->getPermissionObject()->Check('user', 'view')) { $retarr = $uf->getOptions('columns'); } elseif ($this->getPermissionObject()->Check('user', 'enabled') and $this->getPermissionObject()->Check('user', 'view_child')) { $retarr = $uf->getOptions('user_child_secure_columns'); } else { $retarr = $uf->getOptions('user_secure_columns'); } return $retarr; } return parent::getOptions($name, $parent); }