Returns a slider field

@param string|null
@param scalar|null
@return Eden\Block\Field\Text
178843
public function slider($name = null, $value = null) 
	{
		Argument::i()
			->test(1, 'string', 'null')
			->test(2, 'scalar', 'null');
			
		$field = Text::i()->setType('range');
		
		if(!is_null($name)) {
			$field->setName($name);
		}
		
		if(!is_null($value)) {
			$field->setValue($value);
		}
		
		return $field;
	}
494038
public function getScalarEiProperty(): ?ScalarEiProperty {
		return new CommonScalarEiProperty($this, null, function ($value) {
			ArgUtils::valScalar($value, true);
			if ($value === null) return null;
			return (int) $value;
		});
	}
305099
public function chunk($str = null)
    {
        parent::chunk();

        if (null !== $str) {
            printf("%x\r\n", strlen($str));
            echo "$str\r\n";
            flush();
        }

        return $this;
    }
926090
public Csv nullLiteral(String nullLiteral) {
		Preconditions.checkNotNull(nullLiteral);
		internalProperties.putString(FORMAT_NULL_LITERAL, nullLiteral);
		return this;
	}
550026
public function getHeader($sHeader)
    {
        return isset($this->aHeaders[$sHeader]) ? $this->aHeaders[$sHeader] : null;
    }
1326916
public function markdown($name = null, $value = null) 
	{
		Argument::i()
			->test(1, 'string', 'null')
			->test(2, 'scalar', 'null');
			
		$field = Markdown::i();
		
		if(!is_null($name)) {
			$field->setName($name);
		}
		
		if(!is_null($value)) {
			$field->setValue($value);
		}
		
		return $field;
	}
1266819
protected function getField($field)
    {
        foreach ($this->getFields() as $annotatedField) {
            if ($annotatedField->name === $field) {
                return $annotatedField;
            }
        }

        return null;
    }
873751
public function getFieldset($type)
    {
        return !isset($this->requestedFieldsets[$type]) ?
            null :
            new ParamBag($this->requestedFieldsets[$type]);
    }
776794
protected function _getPlainText()
    {
        if (empty($this->_properties['text'])) {
            return null;
        }

        //Loads the `BBCode` helper
        $BBCode = (new HelperRegistry(new View))->load('MeTools.BBCode');

        return trim(strip_tags($BBCode->remove($this->_properties['text'])));
    }
293789
function Slider(options) {

	this.__proto__ = new Control();

	this.init = function(options) {
		this.type = options.type = 'Slider';
		this.parent = options.parent;
		this.defaults = {
			x:48, y:48,
			w:72, h:192,

			//value: 0,
			text: '',
			script: undefined,
			onload: undefined,
			fill:this.parent.fill,
			fill_highlight: this.parent.lighter(this.parent.stroke),
			stroke: this.parent.stroke,
			'stroke-width': this.parent.control_stroke,
			fontsize: this.parent.fontsize,
			repeat: 0,
			running: 0,
			corner: this.parent.button_corner,
			subtype: 'y',		// ***
			group: undefined,
			row: undefined,
			col: undefined,
			autorun: undefined,
			highlighttrue: undefined,
			source: undefined,
			refresh: 0,

			noreadout: undefined,
			min: 0, max: 255,
			xmin: 0, xmax: 255,
			ymin: 0, ymax: 255,
			recenter: undefined,
			value: 0,
			xvalue: 0,
			yvalue: 0,
			barw: 1,
			barh: this.barw
		};
		this.setoptions(options);
		//console.log('Slider:', this);
		this.render();
		return this;
	};

	this.layout = function() {
		if (this.subtype == 'xy') {
			this.slidew = options.slidew || 1+Math.floor(this.w / 12);
			this.slideh = options.slideh || 1+Math.floor(this.h / 12);
		}
		else if (this.subtype == 'x') {
			this.slidew = options.slidew || 1+Math.floor(this.w / 10);
			this.slideh = 0.8 * this.h;
		}
		else {
			this.ymin = options.min || this.ymin;
			this.ymax = options.max || this.ymax;
			this.value = options.value || this.value;
			this.slidew = 0.8 * this.w;
			this.slideh = options.slideh || 1+Math.floor(this.h / 10);
		}

		this.outerw = this.w; if (this.subtype != 'y') this.outerw += this.slidew;
		this.outerh = this.h; if (this.subtype != 'x') this.outerh += this.slideh;

		this.outerxmid = this.x + this.w/2;
		if (this.subtype !='y') this.outerxmid += (this.slidew/2);

		this.outerymid = this.y + this.h/2;
		if (this.subtype !='x') this.outerymid += (this.slideh/2);
	};

	this.render = function() {
		this.layout();
		this.outerrect = this.parent.paper.rect(this.x, this.y, this.outerw, this.outerh, 10)
			.attr({fill:this.fill, stroke:this.stroke, 'stroke-width':this.parent.control_stroke});
		this.elts.push(this.outerrect);

		if (this.subtype != 'y') {
			this.xbar = this.parent.paper.rect(this.x, this.outerymid, this.outerw, this.barh)
				.attr({fill:this.stroke, stroke:this.stroke});
			this.elts.push(this.xbar);
		}
		if (this.subtype != 'x') {
			this.ybar = this.parent.paper.rect(this.outerxmid, this.y, this.barw, this.outerh)
				.attr({fill:this.stroke, stroke:this.stroke});
			this.elts.push(this.ybar);
		}

		var self = this;
		this.slide = this.parent.paper.rect(this.slideXPos(), this.slideYPos(), this.slidew, this.slideh, 5)
			.attr({fill:this.stroke, stroke:this.stroke, 'stroke-width': this['stroke-width']})
			.drag(self.slideMove, self.slideStart, self.slideEnd, self, self, self);

		// OOPS don't want the slide decorated in sethandler(). see dedicated remove method
		//this.elts.push(this.slide);

		if (this.recenter) this.slideToCenter();

		this.label = this.parent.paper.text(this.outerxmid, this.y + this.outerh + this.fontsize*2, this.text)
			.attr({fill:this.stroke, stroke:this.stroke, 'font-size': this.fontsize});
		this.textelts.push(this.label);

		if (!this.noreadout) {
			if ((this.subtype == 'y') || (this.subtype == 'xy')) {
				this.yreadout = this.parent.paper
					.text(this.outerxmid, this.y + this.outerh + this.fontsize, ''+(this.value || this.xvalue || ''))
					.attr({fill:this.stroke, stroke:this.stroke, 'font-size': this.fontsize-2});
				this.textelts.push(this.yreadout);
			}

			if ((this.subtype == 'x') || (this.subtype == 'xy')) {
				 this.xreadout = this.parent.paper.text(this.x + this.outerw + this.fontsize, this.y + this.h/2, ''+(this.yvalue || ''))
					.attr({fill:this.stroke, stroke:this.stroke, 'font-size': this.fontsize-2});
				this.textelts.push(this.xreadout);
			}
		}
		this.sethandlers();
	};

	this.remove = function() {
		this.slide.remove();
		this.__proto__.remove.call(this);
	};

	this.move = function(x, y) {
		this.x = x;
		this.y = y;
		this.outerrect.attr({x:this.x, y:this.y, width:this.w, height:this.h});
		if (this.xbar) this.xbar.attr({x:this.x, y:this.y + this.outerh/2});
		if (this.ybar) this.ybar.attr({x:this.x + (this.w-this.barw)/2, y:this.y});
		this.slide.attr({x:this.x + (this.w - this.slidew)/2, y:this.slideYPos()});

		this.label.attr({x:this.x + this.w/2, y:this.y + this.outerh + this.fontsize*2});
		if (this.xreadout) this.xreadout.attr({x:this.x + this.outerw + this.fontsize, y:this.y + this.h/2});
		if (this.yreadout) this.yreadout.attr({x:this.x + this.w/2, y:this.y + this.outerh + this.fontsize});
	};

	this.slideStart = function(x, y, event) {
		//console.log('Slide start:', x, y, event);
		this.dragslide = {x:this.x, y:this.y};
		this.sliding = true;
		this.slide.attr({fill:this.fill});
	};

	this.slideMove = function(dx, dy, x, y, e) {
		//console.log('Slide move:', dx, dy, x, y, e);
		x = x - this.parent.x;
		y = y - this.parent.y;

		if (y < this.y) y = this.y;
		else if (y > this.y + this.h) y = this.y + this.h;
		if (x < this.x) x = this.x;
		else if (x > this.x + this.w) x = this.x + this.w;

		var xfraction = (x - this.x) / this.w;
		var xvalue = Math.floor(this.xmin + (xfraction) * (this.xmax - this.xmin));
		var yfraction = (y - this.y) / this.h;
		var yvalue = Math.floor(this.ymin + (1.0 - yfraction) * (this.ymax - this.ymin));

		if (this.subtype == 'xy') this.setValue(xvalue, yvalue);
		else if (this.subtype == 'x') this.setValue(xvalue);
		else this.setValue(yvalue);
		return this.slideFinish(e);
	};

	this.slideEnd = function(e) {
		//console.log('Slide end:', e);
		this.slide.attr({fill:this.stroke});
		return this.slideFinish(e);
	};

	this.slideFinish = function(e) {
		e.preventDefault();
		e.stopPropagation();
		delete this.dragslide;
		this.sliding = false;
		this.exec();
		var self = this;
		//console.log('slidefinish:', e, e.type);
		if (this.recenter && ((e.type == 'mouseup') || (e.type == 'touchend'))) {
			window.setTimeout(function() {
				self.slideToCenter();
			}, 10);
		}
		return false;
	};

	this.slideToCenter = function() {
		if (this.subtype == 'xy')
			this.setValue(Math.floor((this.xmax + this.xmin)/2),
				Math.floor((this.ymax + this.ymin)/2));
		else if (this.subtype == 'x') this.setValue(Math.floor((this.xmax + this.xmin)/2));
		else this.setValue(Math.floor((this.ymax + this.ymin)/2));
		this.exec();
	};

	this.slideXPos = function() {
		if (this.subtype == 'y') return this.x + (this.w - this.slidew)/2;
		if (this.xvalue < this.xmin) this.xvalue = this.xmin;
		if (this.xvalue > this.xmax) this.xvalue = this.xmax;
		var fraction = (this.xvalue - this.xmin) / (this.xmax - this.xmin);
		return Math.floor(this.x + this.w * fraction);
	};

	this.slideYPos = function() {
		if (this.subtype == 'x') return this.y + (this.h - this.slideh)/2;
		if (this.yvalue < this.ymin) this.yvalue = this.ymin;
		if (this.yvalue > this.ymax) this.yvalue = this.ymax;
		var fraction = (this.yvalue - this.ymin) / (this.ymax - this.ymin);
		return Math.floor(this.y + this.h * (1.0 - fraction));
	};

	this.handleClick = function() {
		// do nothing; this override prevents the flash that Button wants
	};

	this.setValue = function(value1, value2) {

		//console.log('slider set:', value1, value2, typeof value1, typeof value2);
		if (this.dragging) return;	// be the boss: ignore updates while dragging

		if (this.subtype == 'xy') {
			if (value1 !== undefined) this.xvalue = value1;
			if (value2 !== undefined) this.yvalue = value2;
			if (this.xreadout && (this.xvalue !== undefined)) this.xreadout.attr({text: ''+this.xvalue});
			if (this.yreadout && (this.yvalue !== undefined)) this.yreadout.attr({text: ''+this.yvalue});
			var slidex = this.slideXPos();
			var slidey = this.slideYPos();
			this.slide.attr({x:slidex, y:slidey});
			var update = {id: this.id, xvalue: this.xvalue, yvalue: this.yvalue};
			this.fire('update', update);
		}
		else if (this.subtype == 'x') {
			this.value = this.xvalue = value1;
			if (this.xreadout && (this.value !== undefined)) this.xreadout.attr({text: ''+this.value});
			var slidex = this.slideXPos();
			this.slide.attr({x:slidex});
			var update = {id: this.id, value: this.value};
			this.fire('update', update);
		}
		else {
			this.value = this.yvalue = value1;
			if (this.yreadout && (this.value !== undefined)) this.yreadout.attr({text: ''+this.value});
			var slidey = this.slideYPos();
			//console.log('slidey:', slidey);
			this.slide.attr({y:slidey});
			var update = {id: this.id, value: this.value};
			this.fire('update', update);
		}
	};

	return this.init(options || {});
}
918726
public function text($val=null)
    {
        if ($val !== null) { // set node value for all nodes
            foreach ($this->nodes as $node) {
                $node->nodeValue = $val;
            }

            return $this;
        }
        if ($node = $this->getFirstElmNode()) { // get value for first node
            return $node->nodeValue;
        }
    }
1186060
public function scalar($field) {
		$result = $this->first();
		if (empty($result)) {
			return null;
		}
		return $result->$field;
	}
801850
public function getDisplayHelpTextLstr(): ?Lstr {
		$helpText = $this->displayConfig->getHelpText();
		if ($helpText === null) {
			return null;
		}
		
		return Rocket::createLstr($helpText, $this->getEiMask()->getModuleNamespace())->t($n2nLocale);
	}
237167
function scalar_symbol( $s = null ){
		$t = $this->t;
		if( !is_null($s) ){
			$this->t = $s;
		}
		return $t;
	}
873079
public function field($field=null) {
		$default_render = $this->default_render;
		if($default_render !== null)
			return $default_render($field);
		elseif($field instanceof Field)
			return $field->def();
	}
1159408
public function getCustomField($type, $field)
    {
        if (!isset($this->customFields[$type]) ||
             !isset($this->customFields[$type][$field])) {
            return null;
        }

        return $this->customFields[$type][$field];
    }
1156754
public function wysiwyg($name = null, $value = null) 
	{
		Argument::i()
			->test(1, 'string', 'null')
			->test(2, 'scalar', 'null');
			
		$field = Wysiwyg::i();
		
		if(!is_null($name)) {
			$field->setName($name);
		}
		
		if(!is_null($value)) {
			$field->setValue($value);
		}
		
		return $field;
	}