Skip to content
Extraits de code Groupes Projets
Valider c32a4e6c rédigé par robocoder's avatar robocoder
Parcourir les fichiers

missing phpdocs

git-svn-id: http://dev.piwik.org/svn/trunk@2228 59fd770c-687e-43c8-a1e3-f5a4ff64c105
parent f68a4d50
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -105,6 +105,9 @@ class Piwik_View implements Piwik_iView
return $this->smarty->get_template_vars($key);
}
/**
* Render view
*/
public function render()
{
try {
......@@ -147,11 +150,21 @@ class Piwik_View implements Piwik_iView
return $this->smarty->fetch($this->template);
}
/**
* Set Content-Type field in HTTP response
*
* @param string $contentType
*/
public function setContentType( $contentType )
{
$this->contentType = $contentType;
}
/**
* Add form to view
*
* @param Piwik_Form $form
*/
public function addForm( $form )
{
// Create the renderer object
......@@ -164,7 +177,13 @@ class Piwik_View implements Piwik_iView
$this->smarty->assign('form_data', $renderer->toArray());
$this->smarty->assign('element_list', $form->getElementList());
}
/**
* Assign value to a variable for use in Smarty template
*
* @param string|array $var
* @param mixed $value
*/
public function assign($var, $value=null)
{
if (is_string($var))
......@@ -180,6 +199,9 @@ class Piwik_View implements Piwik_iView
}
}
/**
* Clear compiled Smarty templates
*/
public function clearCompiledTemplates()
{
$this->smarty->clear_compiled_tpl();
......@@ -202,6 +224,13 @@ class Piwik_View implements Piwik_iView
}
*/
/**
* Prepend relative paths with absolute Piwik path
*
* @param string $value relative path (pass by reference)
* @param int $key (don't care)
* @param string $path Piwik root
*/
static public function addPiwikPath(&$value, $key, $path)
{
if($value[0] != '/' && $value[0] != DIRECTORY_SEPARATOR)
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter