Skip to content
Snippets Groups Projects
Select Git revision
  • 4194136993983cdb5504534df5637cba2d53ecaa
  • master default protected
  • devel
  • feature/add-escaping-to-templates
  • feature/add-priority-sorting
  • 3.3.0
  • 3.2.1
  • 3.2.0
  • 3.1.0
  • 3.0.0
  • 2.4.12
  • 2.4.11
  • 2.4.10
  • 2.4.9
  • 2.4.8
  • 2.4.7
  • 2.4.6
  • 2.4.5
  • 2.4.4
  • 2.4.2
  • 2.4.1
  • 2.4.0
  • 2.3.2
  • 2.3.1
  • 2.3
25 results

input-submit.php

Blame
  • Field.php 2.34 KiB
    <?php
    
    namespace WPDesk\Forms;
    
    /**
     * The idea is that from the moment the factory returns this interface it's values cannot be changed.
     * And that is why here are only the getters.
     *
     * The: Validation, Serialization, Sanitization features are provided trough delegated classes (get_validator, get_serializer ...)
     *
     * @package WPDesk\Forms
     */
    interface Field {
    	public function get_name(): string;
    
    	/** @return mixed */
    	public function get_default_value();
    
    	public function get_template_name(): string;
    
    	/** When this field is used on form this field will force it's own template. */
    	public function should_override_form_template(): bool;
    
    	/** HTML label. */
    	public function get_label(): string;
    
    	public function has_label(): bool;
    
    	public function get_description(): string;
    
    	/** Additional field description that should be shown in optional hover tip. */
    	public function get_description_tip(): string;
    
    	public function has_description_tip(): bool;
    
    	public function has_description(): bool;
    
    	public function is_readonly(): bool;
    
    	public function is_disabled(): bool;
    
    	public function get_id(): string;
    
    	public function is_required(): bool;
    
    	public function has_placeholder(): bool;
    
    	public function get_placeholder(): string;
    
    	/**
    	 * @param string[] $except
    	 *
    	 * @return string[] name->value
    	 */
    	public function get_attributes( array $except = [] ): array;
    
    	public function get_attribute( string $name, string $default = null ): string;
    
    	public function is_attribute_set( string $name ): bool;
    
    	/** @return mixed */
    	public function get_meta_value( string $name );
    
    	public function is_meta_value_set( string $name ): bool;
    
    	public function get_classes(): string;
    
    	public function get_type(): string;
    
    	public function has_classes(): bool;