Example #1
0
	/**
	 * Method to instantiate the view.
	 *
	 * @param   JModel            $model  The model object.
	 * @param   SplPriorityQueue  $paths  The paths queue.
	 *
	 * @since   12.1
	 */
	public function __construct(JModel $model, SplPriorityQueue $paths = null)
	{
		parent::__construct($model);

		// Setup dependencies.
		$this->paths = isset($paths) ? $paths : $this->loadPaths();
	}
Example #2
0
 /**
  * Method to instantiate the view.
  *
  * @param   JModel            $model  The model object.
  * @param   SplPriorityQueue  $paths  The paths queue.
  *
  * @since   12.1
  */
 public function __construct(JModel $model, SplPriorityQueue $paths = null)
 {
     parent::__construct($model);
     // Setup dependencies.
     $this->paths = isset($paths) ? $paths : $this->loadPaths();
     /* T3: Add T3 html path to the priority paths of component view */
     // T3 html path
     $component = JApplicationHelper::getComponentName();
     $component = preg_replace('/[^A-Z0-9_\\.-]/i', '', $component);
     $t3Path = T3_PATH . '/html/' . $component . '/' . $this->getName();
     // Setup the template path
     $this->paths->top();
     $defaultPath = $this->paths->current();
     $this->paths->next();
     $templatePath = $this->paths->current();
     // add t3 path
     $this->paths->insert($t3Path, 3);
     $this->_path['template'] = array($defaultPath, $t3Path, $templatePath);
     /* //T3 */
 }
Example #3
0
 /**
  * Tests the escape method.
  *
  * @return  void
  *
  * @covers  JViewBase::escape
  * @since   12.1
  */
 public function testEscape()
 {
     $this->assertEquals('foo', $this->_instance->escape('foo'));
 }