Skip to content
Snippets Groups Projects
Select Git revision
  • be366df8361836ea5991f1a75ee0650c26af52c4
  • 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

Field.php

Blame
  • Field.php 2.87 KiB
    <?php
    
    namespace WPDesk\Forms;
    
    use WPDesk\Forms\Field\BasicField;
    
    /**
     * 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 {
    	/** @return string */
    	public function get_name();
    
    	/** @return mixed */
    	public function get_default_value();
    
    	/** @return string */
    	public function get_template_name();
    
    	/**
    	 * When this field is used on form this field will force it's own template.
    	 *
    	 * return bool
    	 */
    	public function should_override_form_template();
    
    	/**
    	 * HTML label.
    	 *
    	 * @return string
    	 */
    	public function get_label();
    
    	/** bool */
    	public function has_label();
    
    	/**
    	 * Description for field. It can be shown near the field.
    	 *
    	 * @return string
    	 */
    	public function get_description();
    
    	/**
    	 * Additional field description that should be shown in optional hover tip.
    	 *
    	 * @return string
    	 */
    	public function get_description_tip();
    
    	/** @return bool */
    	public function has_description_tip();
    
    	/** @return bool */
    	public function has_description();
    
    	/**
    	 * @return bool
    	 */
    	public function is_readonly();
    
    	/** @return bool */
    	public function is_disabled();
    
    	/** @return string */