2014-05-13 14:24:51 +02:00
|
|
|
<?php
|
|
|
|
// {{{ICINGA_LICENSE_HEADER}}}
|
|
|
|
// {{{ICINGA_LICENSE_HEADER}}}
|
|
|
|
|
|
|
|
namespace Icinga\Web\Wizard;
|
|
|
|
|
|
|
|
use Icinga\Web\Form;
|
|
|
|
|
|
|
|
class Page extends Form
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Whether a CSRF token should not be added to this wizard page
|
|
|
|
*
|
|
|
|
* @var bool
|
|
|
|
*/
|
|
|
|
protected $tokenDisabled = true;
|
|
|
|
|
2014-05-14 12:42:22 +02:00
|
|
|
/**
|
|
|
|
* The wizard this page is part of
|
|
|
|
*
|
|
|
|
* @var Wizard
|
|
|
|
*/
|
|
|
|
protected $wizard;
|
|
|
|
|
2014-05-13 14:24:51 +02:00
|
|
|
/**
|
|
|
|
* The title of this wizard page
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $title = '';
|
|
|
|
|
2014-05-14 12:42:22 +02:00
|
|
|
/**
|
|
|
|
* Create a new wizard page
|
|
|
|
*
|
|
|
|
* @param Wizard $wizard The wizard this page is part of
|
|
|
|
* @param mixed $options Zend_Form options
|
|
|
|
*/
|
|
|
|
public function __construct(Wizard $wizard = null, $options = null)
|
|
|
|
{
|
|
|
|
parent::__construct($options);
|
|
|
|
$this->wizard = $wizard;
|
|
|
|
}
|
|
|
|
|
2014-05-14 09:01:24 +02:00
|
|
|
/**
|
|
|
|
* Overwrite this to initialize this wizard page
|
|
|
|
*/
|
|
|
|
public function init()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2014-05-14 12:44:12 +02:00
|
|
|
/**
|
|
|
|
* Return whether this page needs to be shown to the user
|
|
|
|
*
|
|
|
|
* Overwrite this to add page specific handling
|
|
|
|
*
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function isRequired()
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2014-05-13 14:24:51 +02:00
|
|
|
/**
|
|
|
|
* Set the title for this wizard page
|
|
|
|
*
|
|
|
|
* @param string $title The title to set
|
|
|
|
*/
|
|
|
|
public function setTitle($title)
|
|
|
|
{
|
|
|
|
$this->title = $title;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Return the title of this wizard page
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getTitle()
|
|
|
|
{
|
|
|
|
return $this->title;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2014-05-14 12:44:12 +02:00
|
|
|
* Return a config containing all values provided by the user
|
2014-05-13 14:24:51 +02:00
|
|
|
*
|
|
|
|
* @return Zend_Config
|
|
|
|
*/
|
|
|
|
public function getConfig()
|
|
|
|
{
|
|
|
|
return $this->getConfiguration();
|
|
|
|
}
|
|
|
|
}
|