public function byPosition($position)
	{
		$position = strtolower($position);
		$result   = array();

		$modules = $this->all();

		$total = count($modules);
		for ($i = 0; $i < $total; $i++)
		{
			if ($modules[$i]->position == $position)
			{
				$result[] =& $modules[$i];
			}
		}

		if (count($result) == 0)
		{
			if ($this->outline())
			{
				$result[0] = $this->byName('mod_' . $position);
				$result[0]->title    = $position;
				$result[0]->content  = $position;
				$result[0]->position = $position;
			}
		}

		return $result;
	}
public function byPosition($position)
	{
		$position = strtolower($position);
		$result   = array();

		$modules = $this->all();

		$total = count($modules);
		for ($i = 0; $i < $total; $i++)
		{
			if ($modules[$i]->position == $position)
			{
				$result[] =& $modules[$i];
			}
		}

		if (count($result) == 0)
		{
			if ($this->outline())
			{
				$result[0] = $this->byName('mod_' . $position);
				$result[0]->title    = $position;
				$result[0]->content  = $position;
				$result[0]->position = $position;
			}
		}

		return $result;
	}
public function byPosition ( $ position ) { $ position = strtolower ( $ position ) ; $ result = array ( ) ; $ modules = $ this -> all ( ) ; $ total = count ( $ modules ) ; for ( $ i = 0 ; $ i < $ total ; $ i ++ ) { if ( $ modules [ $ i ] -> position == $ position ) { $ result [ ] = & $ modules [ $ i ] ; } } if ( count ( $ result ) == 0 ) { if ( $ this -> outline ( ) ) { $ result [ 0 ] = $ this -> byName ( 'mod_' . $ position ) ; $ result [ 0 ] -> title = $ position ; $ result [ 0 ] -> content = $ position ; $ result [ 0 ] -> position = $ position ; } } return $ result ; }
Get modules by position

@param   string  $position  The position of the module
@return  array   An array of module objects
Get modules by position