Hawk - PHP documentation
  • Namespace
  • Class
  • Tree

Namespaces

  • Hawk
    • View
      • Plugins

Classes

  • Hawk\App
  • Hawk\ButtonInput
  • Hawk\Cache
  • Hawk\CheckboxInput
  • Hawk\ColorInput
  • Hawk\Conf
  • Hawk\Controller
  • Hawk\Crypto
  • Hawk\DatabaseSessionHandler
  • Hawk\DatetimeInput
  • Hawk\DB
  • Hawk\DBExample
  • Hawk\DeleteInput
  • Hawk\Dialogbox
  • Hawk\EmailInput
  • Hawk\ErrorHandler
  • Hawk\Event
  • Hawk\FileInput
  • Hawk\FileSystem
  • Hawk\FloatInput
  • Hawk\Form
  • Hawk\FormFieldset
  • Hawk\FormInput
  • Hawk\GenericModel
  • Hawk\GifImage
  • Hawk\HawkApi
  • Hawk\HawkUpdater
  • Hawk\HiddenInput
  • Hawk\HtmlInput
  • Hawk\HTTPRequest
  • Hawk\Icon
  • Hawk\Image
  • Hawk\IntegerInput
  • Hawk\ItemList
  • Hawk\ItemListField
  • Hawk\JpegImage
  • Hawk\Lang
  • Hawk\Language
  • Hawk\LeftSidebarTab
  • Hawk\Less
  • Hawk\Logger
  • Hawk\Mail
  • Hawk\MenuItem
  • Hawk\Model
  • Hawk\NoSidebarTab
  • Hawk\NumberInput
  • Hawk\ObjectInput
  • Hawk\Option
  • Hawk\Panel
  • Hawk\PasswordInput
  • Hawk\Permission
  • Hawk\Plugin
  • Hawk\PluginInstaller
  • Hawk\PngImage
  • Hawk\ProfileQuestion
  • Hawk\ProfileQuestionValue
  • Hawk\RadioInput
  • Hawk\Request
  • Hawk\Response
  • Hawk\RightSidebarTab
  • Hawk\Role
  • Hawk\RolePermission
  • Hawk\Route
  • Hawk\Router
  • Hawk\SelectInput
  • Hawk\Session
  • Hawk\Singleton
  • Hawk\SubmitInput
  • Hawk\Tabs
  • Hawk\TextareaInput
  • Hawk\TextInput
  • Hawk\Theme
  • Hawk\TimeInput
  • Hawk\Upload
  • Hawk\User
  • Hawk\View
  • Hawk\View\Plugins\Accordion
  • Hawk\View\Plugins\Button
  • Hawk\View\Plugins\Form
  • Hawk\View\Plugins\Icon
  • Hawk\View\Plugins\Import
  • Hawk\View\Plugins\Panel
  • Hawk\View\Plugins\Tabs
  • Hawk\View\Plugins\Text
  • Hawk\View\Plugins\Uri
  • Hawk\View\Plugins\Widget
  • Hawk\ViewPlugin
  • Hawk\Widget
  • Hawk\WysiwygInput

Traits

  • Hawk\Utils

Exceptions

  • Hawk\AppStopException
  • Hawk\DBExampleException
  • Hawk\DBException
  • Hawk\FileSystemException
  • Hawk\HawkApiException
  • Hawk\ImageException
  • Hawk\MailException
  • Hawk\UploadException
  • Hawk\ViewException
 1 <?php
 2 /**
 3  * FormFieldset.php
 4  *
 5  * @author  Elvyrra SAS
 6  * @license http://rem.mit-license.org/ MIT
 7  */
 8 
 9 namespace Hawk;
10 
11 /**
12  * This class describes the behavior of a form fieldset
13  *
14  * @package Form
15  */
16 class FormFieldset{
17     use Utils;
18 
19     /**
20      * The fieldset name
21      */
22     public $name,
23 
24     /**
25      * The legend of the fieldset
26      */
27     $legend,
28 
29     /**
30      * The inputs in this fieldset
31      */
32     $inputs,
33 
34     /**
35      * The form this fieldset is associated to
36      */
37     $form,
38 
39     /**
40      * The id of the legend tag
41      */
42     $legendId = '';
43 
44     /**
45      * Constructor
46      *
47      * @param Form   $form   The form this fieldset is asssociated to
48      * @param string $name   The fieldset name
49      * @param array  $inputs The inputs in this fieldset
50      * @param array  $params The parameters to apply to this fieldset
51      */
52     public function __construct($form, $name, $inputs= array(), $params = array()){
53         $this->name = $name;
54         $this->form = $form;
55         $this->id = $form->id . '-' . $this->name . '-fieldset';
56         $this->inputs = $inputs;
57         $this->map($params);
58 
59         if($this->legend) {
60             $this->legendId = $form->id . '-' . $this->name . '-legend';
61         }
62     }
63 
64 
65     /**
66      * Set a parameter of the fieldset
67      *
68      * @param string $param the name of the parameter
69      * @param mixed  $value The value to apply
70      */
71     public function setParam($param, $value){
72         $this->$param = $value;
73     }
74 
75     /**
76      * Display the parameter
77      *
78      * @return string The HTML result to display
79      */
80     public function __toString(){
81         return View::make(
82             Theme::getSelected()->getView(Form::VIEWS_DIR . 'form-fieldset.tpl'), array(
83             'fieldset' => $this,
84             )
85         );
86     }
87 }
88 
Hawk - PHP documentation API documentation generated by ApiGen