5 * Copyright (C) 2008 Vincent Tunru
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 2
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
20 * @license http://www.fsf.org/licensing/licenses/info/GPLv2.html GPL v.2
21 * @category PivipModulesDefault
22 * @package Module_Admin
23 * @subpackage ViewHelpers
24 * @copyright (C) 2008 Vincent Tunru
25 * @author Vincent Tunru <email@vincentt.org>
29 * Create a list of modules to configure
31 class Admin_View_Helper_ConfList
33 protected $_list = '';
37 public function setView($view)
43 * Manipulate this object
45 * @return Navigation_View_Helper_ConfList
47 public function confList()
53 * Add an item to the list
55 * @param string $module Name of the module to add to the list
57 public function add($module)
59 $params = array('name' => $module);
62 <a href="' . $this->view
->url($params, 'Admin_ViewModule') . '"
63 title="' . $this->view
->translate('Configure the %s module.', $module)
64 . '">' . $module . '</a>
72 * @return string The list
74 public function __toString()
76 if(!empty($this->_list
))
79 <div class="block admin">
80 <h1>' . $this->view
->translate('Configure modules') . '
82 <ul class="admin modules">' . $this->_list
. '