public static function actions($name, $selected, $component, $section = 'global')
	{
		static $count;

		$count++;

		$path = PATH_APP . '/components/' . $component . '/config/access.xml';
		if (!file_exists($path))
		{
			$path = PATH_CORE . '/components/' . $component . '/config/access.xml';
		}
		$actions = \Hubzero\Access\Access::getActionsFromFile(
			$path,
			"/access/section[@name='" . $section . "']/"
		);

		if (empty($actions))
		{
			$actions = array();
		}

		$html = array();
		$html[] = '<ul class="checklist access-actions">';

		for ($i = 0, $n = count($actions); $i < $n; $i++)
		{
			$item = &$actions[$i];

			// Setup  the variable attributes.
			$eid = $count . 'action_' . $item->id;
			$checked = in_array($item->id, $selected) ? ' checked="checked"' : '';

			// Build the HTML for the item.
			$html[] = '	<li>';
			$html[] = '		<input type="checkbox" name="' . $name . '[]" value="' . $item->id . '" id="' . $eid . '"' . $checked . ' />';
			$html[] = '		<label for="' . $eid . '">' . Lang::txt($item->title) . '</label>';
			$html[] = '	</li>';
		}
		$html[] = '</ul>';

		return implode("\n", $html);
	}
public static function actions($name, $selected, $component, $section = 'global')
	{
		static $count;

		$count++;

		$path = PATH_APP . '/components/' . $component . '/config/access.xml';
		if (!file_exists($path))
		{
			$path = PATH_CORE . '/components/' . $component . '/config/access.xml';
		}
		$actions = \Hubzero\Access\Access::getActionsFromFile(
			$path,
			"/access/section[@name='" . $section . "']/"
		);

		if (empty($actions))
		{
			$actions = array();
		}

		$html = array();
		$html[] = '<ul class="checklist access-actions">';

		for ($i = 0, $n = count($actions); $i < $n; $i++)
		{
			$item = &$actions[$i];

			// Setup  the variable attributes.
			$eid = $count . 'action_' . $item->id;
			$checked = in_array($item->id, $selected) ? ' checked="checked"' : '';

			// Build the HTML for the item.
			$html[] = '	<li>';
			$html[] = '		<input type="checkbox" name="' . $name . '[]" value="' . $item->id . '" id="' . $eid . '"' . $checked . ' />';
			$html[] = '		<label for="' . $eid . '">' . Lang::txt($item->title) . '</label>';
			$html[] = '	</li>';
		}
		$html[] = '</ul>';

		return implode("\n", $html);
	}
public static function actions ( $ name , $ selected , $ component , $ section = 'global' ) { static $ count ; $ count ++ ; $ path = PATH_APP . '/components/' . $ component . '/config/access.xml' ; if ( ! file_exists ( $ path ) ) { $ path = PATH_CORE . '/components/' . $ component . '/config/access.xml' ; } $ actions = \ Hubzero \ Access \ Access :: getActionsFromFile ( $ path , "/access/section[@name='" . $ section . "']/" ) ; if ( empty ( $ actions ) ) { $ actions = array ( ) ; } $ html = array ( ) ; $ html [ ] = '<ul class="checklist access-actions">' ; for ( $ i = 0 , $ n = count ( $ actions ) ; $ i < $ n ; $ i ++ ) { $ item = & $ actions [ $ i ] ; // Setup  the variable attributes. $ eid = $ count . 'action_' . $ item -> id ; $ checked = in_array ( $ item -> id , $ selected ) ? ' checked="checked"' : '' ; // Build the HTML for the item. $ html [ ] = '	<li>' ; $ html [ ] = '		<input type="checkbox" name="' . $ name . '[]" value="' . $ item -> id . '" id="' . $ eid . '"' . $ checked . ' />' ; $ html [ ] = '		<label for="' . $ eid . '">' . Lang :: txt ( $ item -> title ) . '</label>' ; $ html [ ] = '	</li>' ; } $ html [ ] = '</ul>' ; return implode ( "\n" , $ html ) ; }
Returns a UL list of actions with check boxes

@param   string  $name       The name of the checkbox controls array
@param   array   $selected   An array of the checked boxes
@param   string  $component  The component the permissions apply to
@param   string  $section    The section (within a component) the permissions apply to
@return  string
Returns a UL list of actions with check boxes