Phalcon html
NOTE
All classes are prefixed with Phalcon
Html\Attributes¶
-
Namespace
Phalcon\Html
-
Uses
Phalcon\Html\Attributes\RenderInterface
Phalcon\Support\Collection
-
Extends
Collection
-
Implements
RenderInterface
This class helps to work with HTML Attributes
Methods¶
Alias of the render method Render attributes as HTML attributes @todo remove this when we refactor forms. Maybe remove this class? Put it into traitsHtml\Attributes\AttributesInterface ¶
-
Namespace
Phalcon\Html\Attributes
-
Uses
Phalcon\Html\Attributes
-
Extends
-
Implements
-
Phalcon\Html\Attributes\AttributesInterface *
- Interface Phalcon\Html\Attributes\AttributesInterface */
Methods¶
Get Attributes Set AttributesHtml\Attributes\RenderInterface ¶
-
Namespace
Phalcon\Html\Attributes
-
Uses
-
Extends
-
Implements
-
Phalcon\Html\Attributes\RenderInterface *
- Interface Phalcon\Html\Attributes\RenderInterface */
Methods¶
Generate a string represetationHtml\Breadcrumbs¶
-
Namespace
Phalcon\Html
-
Uses
Phalcon\Di\DiInterface
-
Extends
-
Implements
Phalcon\Html\Breadcrumbs
This component offers an easy way to create breadcrumbs for your application. The resulting HTML when calling render()
will have each breadcrumb enclosed in <dt>
tags, while the whole string is enclosed in <dl>
tags.
Properties¶
/**
* Keeps all the breadcrumbs
*
* @var array
*/
private $elements;
/**
* Crumb separator
*
* @var string
*/
private $separator = / ;
/**
* The HTML template to use to render the breadcrumbs.
*
* @var string
*/
private $template = <dt><a href=\"%link%\">%label%</a></dt>;
Methods¶
Adds a new crumb.// Adding a crumb with a link
$breadcrumbs->add("Home", "/");
// Adding a crumb without a link (normally the last one)
$breadcrumbs->add("Users");
$breadcrumbs->remove("/admin/user/create");
// remove a crumb without an url (last link)
$breadcrumbs->remove();
Html\Escaper¶
-
Namespace
Phalcon\Html
-
Uses
Phalcon\Html\Escaper\EscaperInterface
-
Extends
-
Implements
EscaperInterface
Phalcon\Html\Escaper
Escapes different kinds of text securing them. By using this component you may prevent XSS attacks.
This component only works with UTF-8. The PREG extension needs to be compiled with UTF-8 support.
$escaper = new \Phalcon\Html\Escaper();
$escaped = $escaper->escapeCss("font-family: <Verdana>");
echo $escaped; // font\2D family\3A \20 \3C Verdana\3E
Properties¶
/**
* @var bool
*/
protected $doubleEncode = true;
/**
* @var string
*/
protected $encoding = utf-8;
/**
* ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401
*
* @var int
*/
protected $flags = 11;
Methods¶
Escapes a HTML attribute string or arrayIf the input is an array, the keys are the attribute names and the values are attribute values. If a value is boolean (true/false) then the attribute will have no value: ['disabled' => true]
-> `'disabled``
The resulting string will have attribute pairs separated by a space.
Escape CSS strings by replacing non-alphanumeric chars by their hexadecimal escaped representation Detect the character encoding of a string to be handled by an encoder. Special-handling for chr(172) and chr(128) to chr(159) which fail to be detected by mb_detect_encoding() Escape CSS strings by replacing non-alphanumeric chars by their hexadecimal escaped representation Escapes a HTML string. Internally uses htmlspecialchars Escapes a HTML attribute string Escape JavaScript strings by replacing non-alphanumeric chars by their hexadecimal escaped representation Escapes a URL. Internally uses rawurlencode Escapes a HTML string. Internally uses htmlspecialchars Escape javascript strings by replacing non-alphanumeric chars by their hexadecimal escaped representation Utility to normalize a string's encoding to UTF-32. Sets the double_encode to be used by the escaper Sets the encoding to be used by the escaper Sets the HTML quoting type for htmlspecialchars Sets the HTML quoting type for htmlspecialchars Escapes a URL. Internally uses rawurlencode Proxy method for testingHtml\Escaper\EscaperInterface ¶
-
Namespace
Phalcon\Html\Escaper
-
Uses
-
Extends
-
Implements
Interface for Phalcon\Html\Escaper
Methods¶
Escapes a HTML attribute string Escape CSS strings by replacing non-alphanumeric chars by their hexadecimal representation Returns the internal encoding used by the escaper Escapes a HTML string Escape Javascript strings by replacing non-alphanumeric chars by their hexadecimal representation Sets the encoding to be used by the escaper Sets the HTML quoting type for htmlspecialchars Escapes a URL. Internally uses rawurlencodeHtml\Escaper\Exception¶
-
Namespace
Phalcon\Html\Escaper
-
Uses
-
Extends
\Exception
-
Implements
Exceptions thrown in Phalcon\Html\Escaper will use this class
Html\EscaperFactory¶
-
Namespace
Phalcon\Html
-
Uses
-
Extends
-
Implements
Class EscaperFactory
Methods¶
Create a new instance of the objectHtml\Exception¶
-
Namespace
Phalcon\Html
-
Uses
-
Extends
\Exception
-
Implements
Phalcon\Html\Tag\Exception
Exceptions thrown in Phalcon\Html\Tag will use this class
Html\Helper\AbstractHelper ¶
-
Namespace
Phalcon\Html\Helper
-
Uses
Phalcon\Html\Escaper\EscaperInterface
Phalcon\Html\Exception
-
Extends
-
Implements
@property string $delimiter @property EscaperInterface $escaper @property string $indent @property int $indentLevel
Properties¶
/**
* @var string
*/
protected $delimiter = ;
/**
* @var EscaperInterface
*/
protected $escaper;
/**
* @var string
*/
protected $indent = ;
/**
* @var int
*/
protected $indentLevel = 1;
Methods¶
AbstractHelper constructor. Produces a closing tag Replicates the indent x times as per indentLevel Keeps all the attributes sorted - same order all the tome Traverses an array and calls the method defined in the first element with attributes as the second, returning the resulting string Renders all the attributes Renders an elementprotected function renderFullElement( string $tag, string $text, array $attributes = [], bool $raw = bool ): string;
protected function renderTag( string $tag, array $attributes = [], string $close = string ): string;
Html\Helper\AbstractList ¶
-
Namespace
Phalcon\Html\Helper
-
Uses
Phalcon\Html\Exception
-
Extends
AbstractHelper
-
Implements
Class AbstractList
Properties¶
/**
* @var array
*/
protected $attributes;
/**
* @var string
*/
protected $elementTag = li;
/**
* @var array
*/
protected $store;
Methods¶
public function __invoke( string $indent = string, string $delimiter = null, array $attributes = [] ): AbstractList;
Html\Helper\AbstractSeries ¶
-
Namespace
Phalcon\Html\Helper
-
Uses
-
Extends
AbstractHelper
-
Implements
@property array $attributes @property array $store
Properties¶
Methods¶
Generates and returns the HTML for the list. Resets the internal store. Returns the tag name.Html\Helper\Anchor¶
-
Namespace
Phalcon\Html\Helper
-
Uses
Phalcon\Html\Exception
-
Extends
AbstractHelper
-
Implements
Class Anchor
Methods¶
public function __invoke( string $href, string $text, array $attributes = [], bool $raw = bool ): string;
Html\Helper\Base¶
-
Namespace
Phalcon\Html\Helper
-
Uses
Phalcon\Html\Exception
-
Extends
AbstractHelper
-
Implements
Class Base
Methods¶
Produce a<base/>
tag. Html\Helper\Body¶
-
Namespace
Phalcon\Html\Helper
-
Uses
Phalcon\Html\Exception
-
Extends
AbstractHelper
-
Implements
Class Body
Methods¶
Produce a<body>
tag. Html\Helper\Button¶
-
Namespace
Phalcon\Html\Helper
-
Uses
Phalcon\Html\Exception
-
Extends
AbstractHelper
-
Implements
Class Button
Methods¶
Produce a<button>
tag. Html\Helper\Close¶
-
Namespace
Phalcon\Html\Helper
-
Uses
-
Extends
AbstractHelper
-
Implements
Class Close
Methods¶
Produce a</...>
tag. Html\Helper\Doctype¶
-
Namespace
Phalcon\Html\Helper
-
Uses
-
Extends
-
Implements
Creates Doctype tags
Constants¶
const HTML32 = 1;
const HTML401_FRAMESET = 4;
const HTML401_STRICT = 2;
const HTML401_TRANSITIONAL = 3;
const HTML5 = 5;
const XHTML10_FRAMESET = 8;
const XHTML10_STRICT = 6;
const XHTML10_TRANSITIONAL = 7;
const XHTML11 = 9;
const XHTML20 = 10;
const XHTML5 = 11;
Properties¶
Methods¶
public function __invoke( int $flag = static-constant-access, string $delimiter = string ): Doctype;
Html\Helper\Element¶
-
Namespace
Phalcon\Html\Helper
-
Uses
Phalcon\Html\Exception
-
Extends
AbstractHelper
-
Implements
Class Element
Methods¶
public function __invoke( string $tag, string $text, array $attributes = [], bool $raw = bool ): string;
Html\Helper\Form¶
-
Namespace
Phalcon\Html\Helper
-
Uses
Phalcon\Html\Exception
-
Extends
AbstractHelper
-
Implements
Class Form
Methods¶
Produce a<form>
tag. Html\Helper\Img¶
-
Namespace
Phalcon\Html\Helper
-
Uses
Phalcon\Html\Exception
-
Extends
AbstractHelper
-
Implements
Class Img
Methods¶
Produce a tag.Html\Helper\Input\AbstractInput ¶
-
Namespace
Phalcon\Html\Helper\Input
-
Uses
Phalcon\Html\Helper\AbstractHelper
-
Extends
AbstractHelper
-
Implements
Class AbstractInput
@property array $attributes @property string $type @property string $value
Properties¶
Methods¶
public function __invoke( string $name, string $value = null, array $attributes = [] ): AbstractInput;
Html\Helper\Input\Checkbox¶
-
Namespace
Phalcon\Html\Helper\Input
-
Uses
Phalcon\Html\Escaper\EscaperInterface
-
Extends
AbstractInput
-
Implements
Class Checkbox
@property array $label
Properties¶
Methods¶
AbstractHelper constructor. Returns the HTML for the input. Attaches a label to the elementHtml\Helper\Input\Color¶
-
Namespace
Phalcon\Html\Helper\Input
-
Uses
-
Extends
AbstractInput
-
Implements
Class Color
Properties¶
Html\Helper\Input\Date¶
-
Namespace
Phalcon\Html\Helper\Input
-
Uses
-
Extends
AbstractInput
-
Implements
Class Date
Properties¶
Html\Helper\Input\DateTime¶
-
Namespace
Phalcon\Html\Helper\Input
-
Uses
-
Extends
AbstractInput
-
Implements
Class DateTime
Properties¶
Html\Helper\Input\DateTimeLocal¶
-
Namespace
Phalcon\Html\Helper\Input
-
Uses
-
Extends
AbstractInput
-
Implements
Class DateTimeLocal
Properties¶
Html\Helper\Input\Email¶
-
Namespace
Phalcon\Html\Helper\Input
-
Uses
-
Extends
AbstractInput
-
Implements
Class Email
Properties¶
Html\Helper\Input\File¶
-
Namespace
Phalcon\Html\Helper\Input
-
Uses
-
Extends
AbstractInput
-
Implements
Class File
Properties¶
Html\Helper\Input\Hidden¶
-
Namespace
Phalcon\Html\Helper\Input
-
Uses
-
Extends
AbstractInput
-
Implements
Class Hidden
Properties¶
Html\Helper\Input\Image¶
-
Namespace
Phalcon\Html\Helper\Input
-
Uses
-
Extends
AbstractInput
-
Implements
Class Image
Properties¶
Html\Helper\Input\Input¶
-
Namespace
Phalcon\Html\Helper\Input
-
Uses
-
Extends
AbstractInput
-
Implements
Class Input
Methods¶
Sets the type of the inputHtml\Helper\Input\Month¶
-
Namespace
Phalcon\Html\Helper\Input
-
Uses
-
Extends
AbstractInput
-
Implements
Class Month
Properties¶
Html\Helper\Input\Numeric¶
-
Namespace
Phalcon\Html\Helper\Input
-
Uses
-
Extends
AbstractInput
-
Implements
Class Numeric
Properties¶
Html\Helper\Input\Password¶
-
Namespace
Phalcon\Html\Helper\Input
-
Uses
-
Extends
AbstractInput
-
Implements
Class Password
Properties¶
Html\Helper\Input\Radio¶
-
Namespace
Phalcon\Html\Helper\Input
-
Uses
-
Extends
Checkbox
-
Implements
Class Radio
Properties¶
Html\Helper\Input\Range¶
-
Namespace
Phalcon\Html\Helper\Input
-
Uses
-
Extends
AbstractInput
-
Implements
Class Range
Properties¶
Html\Helper\Input\Search¶
-
Namespace
Phalcon\Html\Helper\Input
-
Uses
-
Extends
AbstractInput
-
Implements
Class Search
Properties¶
Html\Helper\Input\Select¶
-
Namespace
Phalcon\Html\Helper\Input
-
Uses
Phalcon\Html\Helper\AbstractList
-
Extends
AbstractList
-
Implements
Class Select
Properties¶
/**
* @var string
*/
protected $elementTag = option;
/**
* @var bool
*/
protected $inOptGroup = false;
/**
* @var string
*/
protected $selected = ;
Methods¶
public function add( string $text, string $value = null, array $attributes = [], bool $raw = bool ): Select;
public function addPlaceholder( string $text, mixed $value = null, array $attributes = [], bool $raw = bool ): Select;
Html\Helper\Input\Submit¶
-
Namespace
Phalcon\Html\Helper\Input
-
Uses
-
Extends
AbstractInput
-
Implements
Class Submit
Properties¶
Html\Helper\Input\Tel¶
-
Namespace
Phalcon\Html\Helper\Input
-
Uses
-
Extends
AbstractInput
-
Implements
Class Tel
Properties¶
Html\Helper\Input\Text¶
-
Namespace
Phalcon\Html\Helper\Input
-
Uses
-
Extends
AbstractInput
-
Implements
Class Text
Html\Helper\Input\Textarea¶
-
Namespace
Phalcon\Html\Helper\Input
-
Uses
Phalcon\Html\Exception
-
Extends
AbstractInput
-
Implements
Class Textarea
Properties¶
Methods¶
Returns the HTML for the input.Html\Helper\Input\Time¶
-
Namespace
Phalcon\Html\Helper\Input
-
Uses
-
Extends
AbstractInput
-
Implements
Class Time
Properties¶
Html\Helper\Input\Url¶
-
Namespace
Phalcon\Html\Helper\Input
-
Uses
-
Extends
AbstractInput
-
Implements
Class Url
Properties¶
Html\Helper\Input\Week¶
-
Namespace
Phalcon\Html\Helper\Input
-
Uses
-
Extends
AbstractInput
-
Implements
Class Week
Properties¶
Html\Helper\Label¶
-
Namespace
Phalcon\Html\Helper
-
Uses
Phalcon\Html\Exception
-
Extends
AbstractHelper
-
Implements
Class Label
Methods¶
Produce a<label>
tag. Html\Helper\Link¶
-
Namespace
Phalcon\Html\Helper
-
Uses
-
Extends
Style
-
Implements
Creates tags
Methods¶
Add an element to the list Returns the necessary attributesHtml\Helper\Meta¶
-
Namespace
Phalcon\Html\Helper
-
Uses
Phalcon\Html\Exception
-
Extends
AbstractSeries
-
Implements
Class Meta
Methods¶
Add an element to the listHtml\Helper\Ol¶
-
Namespace
Phalcon\Html\Helper
-
Uses
-
Extends
AbstractList
-
Implements
Class Ol
Methods¶
Add an element to the listHtml\Helper\Script¶
-
Namespace
Phalcon\Html\Helper
-
Uses
Phalcon\Html\Exception
-
Extends
AbstractSeries
-
Implements
Class Script
Methods¶
Add an element to the list Returns the necessary attributesHtml\Helper\Style¶
-
Namespace
Phalcon\Html\Helper
-
Uses
Phalcon\Html\Exception
-
Extends
AbstractSeries
-
Implements
Class Style
Properties¶
Methods¶
Add an element to the list Sets if this is a style or link tag Returns the necessary attributesHtml\Helper\Title¶
-
Namespace
Phalcon\Html\Helper
-
Uses
Phalcon\Html\Exception
-
Extends
AbstractHelper
-
Implements
Class Title
@property array $append @property string $delimiter @property string $indent @property array $prepend @property string $title @property string $separator
Properties¶
/**
* @var array
*/
protected $append;
/**
* @var array
*/
protected $prepend;
/**
* @var string
*/
protected $title = ;
/**
* @var string
*/
protected $separator = ;
Methods¶
Sets the separator and returns the object back Returns the title tags Appends text to current document title Returns the title Prepends text to current document title Sets the title Sets the separatorHtml\Helper\Ul¶
-
Namespace
Phalcon\Html\Helper
-
Uses
-
Extends
Ol
-
Implements
Class Ul
Methods¶
Html\Link\AbstractLink ¶
-
Namespace
Phalcon\Html\Link
-
Uses
Phalcon\Support\Collection
-
Extends
-
Implements
@property array $attributes @property string $href @property array $rels @property bool $templated
Properties¶
/**
* @var Collection
*/
protected $attributes;
/**
* @var string
*/
protected $href = ;
/**
* @var Collection
*/
protected $rels;
/**
* @var bool
*/
protected $templated = false;
Methods¶
Link constructor. Returns a list of attributes that describe the target URI. Returns the target of the link.The target link must be one of: - An absolute URI, as defined by RFC 5988. - A relative URI, as defined by RFC 5988. The base of the relative link is assumed to be known based on context by the client. - A URI template as defined by RFC 6570.
If a URI template is returned, isTemplated() MUST return True.
Returns the relationship type(s) of the link.This method returns 0 or more relationship types for a link, expressed as an array of strings.
Returns whether this is a templated link. Determines if a href is a templated link or not.@see https://tools.ietf.org/html/rfc6570
Html\Link\AbstractLinkProvider ¶
-
Namespace
Phalcon\Html\Link
-
Uses
Phalcon\Html\Link\Interfaces\LinkInterface
-
Extends
-
Implements
@property array $links
Properties¶
Methods¶
LinkProvider constructor. Returns an iterable of LinkInterface objects.The iterable may be an array or any PHP \Traversable object. If no links are available, an empty array or \Traversable MUST be returned.
Returns an iterable of LinkInterface objects that have a specific relationship.The iterable may be an array or any PHP \Traversable object. If no links with that relationship are available, an empty array or \Traversable MUST be returned.
Returns an instance with the specified link included.If the specified link is already present, this method MUST return normally without errors. The link is present if $link is === identical to a link object already in the collection.
Returns an instance with the specified link removed.If the specified link is not present, this method MUST return normally without errors. The link is present if $link is === identical to a link object already in the collection.
Returns the object hash keyHtml\Link\EvolvableLink¶
-
Namespace
Phalcon\Html\Link
-
Uses
Phalcon\Html\Link\Interfaces\EvolvableLinkInterface
-
Extends
Link
-
Implements
EvolvableLinkInterface
Class Phalcon\Http\Link\EvolvableLink
@property array attributes @property string href @property array rels @property bool templated
Methods¶
Returns an instance with the specified attribute added.If the specified attribute is already present, it will be overwritten with the new value.
Returns an instance with the specified href. Returns an instance with the specified relationship included.If the specified rel is already present, this method MUST return normally without errors, but without adding the rel a second time.
Returns an instance with the specified attribute excluded.If the specified attribute is not present, this method MUST return normally without errors.
Returns an instance with the specified relationship excluded.If the specified rel is not present, this method MUST return normally without errors.
Html\Link\EvolvableLinkProvider¶
-
Namespace
Phalcon\Html\Link
-
Uses
Phalcon\Html\Link\Interfaces\EvolvableLinkProviderInterface
Phalcon\Html\Link\Interfaces\LinkInterface
-
Extends
LinkProvider
-
Implements
EvolvableLinkProviderInterface
Class Phalcon\Http\Link\LinkProvider
@property LinkInterface[] links
Methods¶
Returns an instance with the specified link included.If the specified link is already present, this method MUST return normally without errors. The link is present if link is === identical to a link object already in the collection.
Returns an instance with the specified link removed.If the specified link is not present, this method MUST return normally without errors. The link is present if link is === identical to a link object already in the collection.
Html\Link\Interfaces\EvolvableLinkInterface ¶
-
Namespace
Phalcon\Html\Link\Interfaces
-
Uses
-
Extends
LinkInterface
-
Implements
An evolvable link value object.
Methods¶
Returns an instance with the specified attribute added.If the specified attribute is already present, it will be overwritten with the new value.
Returns an instance with the specified href. Returns an instance with the specified relationship included.If the specified rel is already present, this method MUST return normally without errors, but without adding the rel a second time.
Returns an instance with the specified attribute excluded.If the specified attribute is not present, this method MUST return normally without errors.
Returns an instance with the specified relationship excluded.If the specified rel is already not present, this method MUST return normally without errors.
Html\Link\Interfaces\EvolvableLinkProviderInterface ¶
-
Namespace
Phalcon\Html\Link\Interfaces
-
Uses
-
Extends
LinkProviderInterface
-
Implements
An evolvable link provider value object.
Methods¶
Returns an instance with the specified link included.If the specified link is already present, this method MUST return normally without errors. The link is present if $link is === identical to a link object already in the collection.
Returns an instance with the specifed link removed.If the specified link is not present, this method MUST return normally without errors. The link is present if $link is === identical to a link object already in the collection.
Html\Link\Interfaces\LinkInterface ¶
-
Namespace
Phalcon\Html\Link\Interfaces
-
Uses
-
Extends
-
Implements
A readable link object.
Methods¶
Returns a list of attributes that describe the target URI. Returns the target of the link.The target link must be one of: - An absolute URI, as defined by RFC 5988. - A relative URI, as defined by RFC 5988. The base of the relative link is assumed to be known based on context by the client. - A URI template as defined by RFC 6570.
If a URI template is returned, isTemplated() MUST return True.
Returns the relationship type(s) of the link.This method returns 0 or more relationship types for a link, expressed as an array of strings.
Returns whether this is a templated link.Html\Link\Interfaces\LinkProviderInterface ¶
-
Namespace
Phalcon\Html\Link\Interfaces
-
Uses
-
Extends
-
Implements
A link provider object.
Methods¶
Returns an array of LinkInterface objects. Returns an array of LinkInterface objects that have a specific relationship.Html\Link\Link¶
-
Namespace
Phalcon\Html\Link
-
Uses
Phalcon\Html\Link\Interfaces\LinkInterface
Phalcon\Support\Collection
Phalcon\Support\Collection\CollectionInterface
-
Extends
AbstractLink
-
Implements
LinkInterface
Class Phalcon\Http\Link\Link
@property array attributes @property string href @property array rels @property bool templated
Methods¶
Returns a list of attributes that describe the target URI. Returns the target of the link.The target link must be one of: - An absolute URI, as defined by RFC 5988. - A relative URI, as defined by RFC 5988. The base of the relative link is assumed to be known based on context by the client. - A URI template as defined by RFC 6570.
If a URI template is returned, isTemplated() MUST return True.
Returns the relationship type(s) of the link.This method returns 0 or more relationship types for a link, expressed as an array of strings.
Returns whether or not this is a templated link.Html\Link\LinkProvider¶
-
Namespace
Phalcon\Html\Link
-
Uses
Phalcon\Html\Link\Interfaces\LinkInterface
Phalcon\Html\Link\Interfaces\LinkProviderInterface
-
Extends
AbstractLinkProvider
-
Implements
LinkProviderInterface
@property LinkInterface[] links
Methods¶
Returns an iterable of LinkInterface objects.The iterable may be an array or any PHP \Traversable object. If no links are available, an empty array or \Traversable MUST be returned.
Returns an iterable of LinkInterface objects that have a specific relationship.The iterable may be an array or any PHP \Traversable object. If no links with that relationship are available, an empty array or \Traversable MUST be returned.
Html\Link\Serializer\Header¶
-
Namespace
Phalcon\Html\Link\Serializer
-
Uses
-
Extends
-
Implements
SerializerInterface
Class Phalcon\Http\Link\Serializer\Header
Methods¶
Serializes all the passed links to a HTTP link headerHtml\Link\Serializer\SerializerInterface ¶
-
Namespace
Phalcon\Html\Link\Serializer
-
Uses
-
Extends
-
Implements
Class Phalcon\Http\Link\Serializer\SerializerInterface
Methods¶
Serializer methodHtml\TagFactory¶
-
Namespace
Phalcon\Html
-
Uses
Phalcon\Factory\AbstractFactory
Phalcon\Html\Escaper\EscaperInterface
Phalcon\Html\Helper\Doctype
Phalcon\Html\Helper\Input\Checkbox
Phalcon\Html\Helper\Input\Color
Phalcon\Html\Helper\Input\Date
Phalcon\Html\Helper\Input\DateTime
Phalcon\Html\Helper\Input\DateTimeLocal
Phalcon\Html\Helper\Input\Email
Phalcon\Html\Helper\Input\File
Phalcon\Html\Helper\Input\Hidden
Phalcon\Html\Helper\Input\Image
Phalcon\Html\Helper\Input\Input
Phalcon\Html\Helper\Input\Month
Phalcon\Html\Helper\Input\Numeric
Phalcon\Html\Helper\Input\Password
Phalcon\Html\Helper\Input\Radio
Phalcon\Html\Helper\Input\Range
Phalcon\Html\Helper\Input\Search
Phalcon\Html\Helper\Input\Select
Phalcon\Html\Helper\Input\Submit
Phalcon\Html\Helper\Input\Tel
Phalcon\Html\Helper\Input\Text
Phalcon\Html\Helper\Input\Textarea
Phalcon\Html\Helper\Input\Time
Phalcon\Html\Helper\Input\Url
Phalcon\Html\Helper\Input\Week
Phalcon\Html\Helper\Meta
Phalcon\Html\Helper\Ol
Phalcon\Html\Helper\Script
Phalcon\Html\Helper\Style
Phalcon\Html\Helper\Title
Phalcon\Html\Helper\Ul
Phalcon\Html\Link\Link
-
Extends
AbstractFactory
-
Implements
ServiceLocator implementation for Tag helpers.
Services are registered using the constructor using a key-value pair. The key is the name of the tag helper, while the value is a callable that returns the object.
The class implements __call()
to allow calling helper objects as methods.
@property EscaperInterface $escaper @property array $services
@method string a(string $href, string $text, array $attributes = [], bool $raw = false) @method string base(string $href, array $attributes = []) @method string body(array $attributes = []) @method string button(string $text, array $attributes = [], bool $raw = false) @method string close(string $tag, bool $raw = false) @method Doctype doctype(int $flag, string $delimiter) @method string element(string $tag, string $text, array $attributes = [], bool $raw = false) @method string form(array $attributes = []) @method string img(string $src, array $attributes = []) @method Checkbox inputCheckbox(string $name, string $value = null, array $attributes = []) @method Color inputColor(string $name, string $value = null, array $attributes = []) @method Date inputDate(string $name, string $value = null, array $attributes = []) @method DateTime inputDateTime(string $name, string $value = null, array $attributes = []) @method DateTimeLocal inputDateTimeLocal(string $name, string $value = null, array $attributes = []) @method Email inputEmail(string $name, string $value = null, array $attributes = []) @method File inputFile(string $name, string $value = null, array $attributes = []) @method Hidden inputHidden(string $name, string $value = null, array $attributes = []) @method Image inputImage(string $name, string $value = null, array $attributes = []) @method Input inputInput(string $name, string $value = null, array $attributes = []) @method Month inputMonth(string $name, string $value = null, array $attributes = []) @method Numeric inputNumeric(string $name, string $value = null, array $attributes = []) @method Password inputPassword(string $name, string $value = null, array $attributes = []) @method Radio inputRadio(string $name, string $value = null, array $attributes = []) @method Range inputRange(string $name, string $value = null, array $attributes = []) @method Search inputSearch(string $name, string $value = null, array $attributes = []) @method Select inputSelect(string $name, string $value = null, array $attributes = []) @method Submit inputSubmit(string $name, string $value = null, array $attributes = []) @method Tel inputTel(string $name, string $value = null, array $attributes = []) @method Text inputText(string $name, string $value = null, array $attributes = []) @method Textarea inputTextarea(string $name, string $value = null, array $attributes = []) @method Time inputTime(string $name, string $value = null, array $attributes = []) @method Url inputUrl(string $name, string $value = null, array $attributes = []) @method Week inputWeek(string $name, string $value = null, array $attributes = []) @method string label(string $label, array $attributes = [], bool $raw = false) @method Link link(string $indent = ' ', string $delimiter = PHP_EOL) @method Meta meta(string $indent = ' ', string $delimiter = PHP_EOL) @method Ol ol(string $text, array $attributes = [], bool $raw = false) @method Script script(string $indent = ' ', string $delimiter = PHP_EOL) @method Style style(string $indent = ' ', string $delimiter = PHP_EOL) @method Title title(string $indent = ' ', string $delimiter = PHP_EOL) @method Ul ul(string $text, array $attributes = [], bool $raw = false)