Skip to content
Snippets Groups Projects
Select Git revision
  • a8c974598597e0723b0cb3eb16233635805338f0
  • master default protected
  • feat/npm-publish
  • feat/demo-deploy
  • change-demo-deploy
  • remove-smoke
  • feat/acceptance-tests
  • feature/deploy-composer.json
  • feature/mysql-bin-logs
  • skip-codecept-for-libs
  • include-composer-json
  • exclude-wp-assets
  • update_codecept_image
  • fix/silenced-copy
  • remove-free-translations
  • codeception-with-optional-step
  • improve-parallelization
  • linter-exit
  • change-images
  • fix/linter
  • globally-raise-mem-limit
  • no-symlink2
22 results

integration.yml

Blame
  • CheckboxField.php 627 B
    <?php
    
    namespace WPDesk\Forms\Field;
    
    use WPDesk\Forms\Field;
    
    class CheckboxField extends BasicField {
    	const VALUE_TRUE  = 'yes';
    	const VALUE_FALSE = 'no';
    
    	public function __construct() {
    		parent::__construct();
    		$this->set_attribute( 'type', 'checkbox' );
    	}
    
    	public function get_template_name(): string {
    		return 'input-checkbox';
    	}
    
    	public function get_sublabel(): string {
    		return $this->meta['sublabel'];
    	}
    
    	public function set_sublabel( string $value ): Field {
    		$this->meta['sublabel'] = $value;
    
    		return $this;
    	}
    
    	public function has_sublabel(): bool {
    		return isset( $this->meta['sublabel'] );
    	}
    }