/**
  * Return the checked status for a checkbox signifying whether an action is allowed or denied on a resource.
  *
  * @param String $action The action to be executed on the resource
  * 
  * @return String the checked attribute value for the checkbox
  */
 function getCheckedStatus($action)
 {
     return getCheckedAttribute($this->checkPermissionForAction($action));
 }
Example #2
0
 /**
  *
  * Return the checked attribute for an HTML radio button or check box by comparing the
  * expected value of the control with the actual value
  * 
  * @param String $expected The expected value
  * @param String $actual The actual value
  * @return String the checked attribute if the specified values are equal or an empty string if they are not
  */
 function getCheckedAttributeForValue($expected, $actual)
 {
     return getCheckedAttribute(strtolower($expected) == strtolower($actual) ? true : false);
 }