Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/smart-sl.../Nextend/Framewor.../Form/Element
File: AbstractChooser.php
<?php
[0] Fix | Delete
[1] Fix | Delete
[2] Fix | Delete
namespace Nextend\Framework\Form\Element;
[3] Fix | Delete
[4] Fix | Delete
[5] Fix | Delete
use Nextend\Framework\View\Html;
[6] Fix | Delete
[7] Fix | Delete
abstract class AbstractChooser extends AbstractFieldHidden {
[8] Fix | Delete
[9] Fix | Delete
protected $hasClear = true;
[10] Fix | Delete
[11] Fix | Delete
protected $class = '';
[12] Fix | Delete
[13] Fix | Delete
protected $width;
[14] Fix | Delete
[15] Fix | Delete
abstract protected function addScript();
[16] Fix | Delete
[17] Fix | Delete
protected function fetchElement() {
[18] Fix | Delete
[19] Fix | Delete
$this->addScript();
[20] Fix | Delete
[21] Fix | Delete
$this->renderRelatedFields();
[22] Fix | Delete
[23] Fix | Delete
return Html::tag('div', array(
[24] Fix | Delete
'class' => 'n2_field_chooser ' . $this->class
[25] Fix | Delete
), $this->pre() . parent::fetchElement() . $this->field() . $this->post());
[26] Fix | Delete
}
[27] Fix | Delete
[28] Fix | Delete
protected function pre() {
[29] Fix | Delete
[30] Fix | Delete
}
[31] Fix | Delete
[32] Fix | Delete
protected function field() {
[33] Fix | Delete
$style = '';
[34] Fix | Delete
if ($this->width) {
[35] Fix | Delete
$style = 'width: ' . $this->width . 'px;';
[36] Fix | Delete
}
[37] Fix | Delete
[38] Fix | Delete
return '<div class="n2_field_chooser__label" style="' . $style . '"></div>';
[39] Fix | Delete
}
[40] Fix | Delete
[41] Fix | Delete
protected function post() {
[42] Fix | Delete
[43] Fix | Delete
$html = '';
[44] Fix | Delete
if ($this->hasClear) {
[45] Fix | Delete
$html .= Html::tag('a', array(
[46] Fix | Delete
'href' => '#',
[47] Fix | Delete
'class' => 'n2_field_chooser__clear'
[48] Fix | Delete
), Html::tag('i', array('class' => 'ssi_16 ssi_16--circularremove'), ''));
[49] Fix | Delete
}
[50] Fix | Delete
[51] Fix | Delete
$html .= Html::tag('a', array(
[52] Fix | Delete
'href' => '#',
[53] Fix | Delete
'class' => 'n2_field_chooser__choose'
[54] Fix | Delete
), '<i class="ssi_16 ssi_16--plus"></i>');
[55] Fix | Delete
[56] Fix | Delete
return $html;
[57] Fix | Delete
}
[58] Fix | Delete
[59] Fix | Delete
/**
[60] Fix | Delete
* @param bool $hasClear
[61] Fix | Delete
*/
[62] Fix | Delete
public function setHasClear($hasClear) {
[63] Fix | Delete
$this->hasClear = $hasClear;
[64] Fix | Delete
}
[65] Fix | Delete
[66] Fix | Delete
/**
[67] Fix | Delete
* @param int $width
[68] Fix | Delete
*/
[69] Fix | Delete
public function setWidth($width) {
[70] Fix | Delete
$this->width = $width;
[71] Fix | Delete
}
[72] Fix | Delete
}
[73] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function