- 7.2. Opt_View class
7.2.29. setFormatGlobal() - 7.2.28. setFormat()
« Previous - 7.2.30. setTemplate()
Next »
7.2.29. setFormatGlobal()
| Construct | Static method |
|---|---|
| Visibility | public |
| Reference | void setFormatGlobal( string $item, string $format [, boolean $global = true ] ) |
Sets the format to the global template item $name. To get to know more about data formats in OPT, see a chapter about data formats.
Opt_View::setFormatGlobal()in fact provides a nice, object-independent wrapper to specify the global variable format without the need of having anOpt_Viewobject. The following two lines are equivalent:$view->setFormat('global.variable', 'Objective'); Opt_View::setFormatGlobal('variable', 'Objective');
If the $global argument is false, the method does not prepend global. string to the registered item. It
can be used to specify the data format of the local variable in all the views, instead of one. Note that a particular
view can overwrite this format with setFormat().
The
$globalattribute is available since OPT 2.0.1.
See also:
- 7.2.29. setFormatGlobal()
7.2. Opt_View class - « Previous
7.2.28. setFormat() - Next »
7.2.30. setTemplate()