Public methods --------------
2904
function (value, strategy, e) {
      var pre = this.getTextFromHeadToCaret();
      var post = this.el.value.substring(pre.length);
      var newSubstr = strategy.replace(value, e);
      var regExp;
      if (typeof newSubstr !== 'undefined') {
        if ($.isArray(newSubstr)) {
          post = newSubstr[1] + post;
          newSubstr = newSubstr[0];
        }
        regExp = $.isFunction(strategy.match) ? strategy.match(pre) : strategy.match;
        pre = pre.replace(regExp, newSubstr);
        this.$el.val(pre + post);
        this.el.focus();
        var range = this.el.createTextRange();
        range.collapse(true);
        range.moveEnd('character', pre.length);
        range.moveStart('character', pre.length);
        range.select();
      }
    }
1374179
public function process()
    {
        parent::process();

        if ($this->value === null) {
            return;
        }

        $float_value = $this->getNumericValue($this->value);

        if ($float_value === null) {
            $this->addMessage($this->getValidationMessage('float'));
        } else {
            $this->value = $float_value;
        }
    }
1013522
public function init() {

		parent::init();

		$this->modelService = isset( $this->modelService ) ? $this->modelService : $this->controller->modelService;
	}
683787
public function initialize()
    {
        if ($this->all()->count() < 1) {
            return;
        }

        $this->all()->each(function (ActionInterface $action) {
            $action->initialize();
        });

        $this->setHtmlAttribute('data-type', 'display-actions');

        if (! $this->hasHtmlAttribute('class')) {
            $this->setHtmlAttribute('class', 'panel-footer');
        }
    }
747808
public function init(): void
    {
        parent::init();

        if ($this->default !== '' && $this->default !== null && !is_array($this->default)) {
            try {
                $default = Json::decode($this->default);

                if (is_array($default)) {
                    $this->default = $default;
                }
            } catch (InvalidArgumentException $exception) {}
        }
    }
1155837
public function init(): void
    {
        if ($this->sourcePath !== null) {
            $this->sourcePath = $this->findPath($this->sourcePath);
        }
        if ($this->basePath !== null) {
            $this->basePath = $this->findPath($this->basePath);
        }
        if ($this->baseUrl !== null) {
            $this->baseUrl = rtrim(Yii::getAlias($this->baseUrl), '/');
        }
    }
885885
public function validateResolved()
    {
        $this->prepareForValidation();

        if (! $this->passesAuthorization()) {
            $this->failedAuthorization();
        }

        $instance = $this->getValidatorInstance();

        if ($instance->fails()) {
            $this->failedValidation($instance);
        }
    }
1076766
public function init() {
    parent::init();
    if (empty($this->options['id'])) {
      $this->options['id'] = $this->getId();
    }
  }
214308
public function process()
    {
        if (!$this->getForm()->isSubmitted()) {
            return;
        }

        parent::process();

        $this->processValues();

        if (
            $this->required &&
            count($this->values) == 0 &&
            $this->isSensitive()
        ) {
            $this->addMessage($this->getValidationMessage('required'));
        }
    }
1318726
public function render() {

		if(isset($this->methodName)) {
			$methodName = $this->methodName;
			$this->$methodName()->sendContent();
		}
		else {
			$this->execute()->sendContent();
		}

	}
1024020
public function init() {

		parent::init();

		// Views
		$this->setViewPath( '@cmsgears/module-core/admin/views/role' );

		// Permission
		$this->crudPermission = CoreGlobal::PERM_RBAC;

		// Config
		$this->type		= CoreGlobal::TYPE_SYSTEM;
		$this->apixBase	= 'core/role';

		// Services
		$this->modelService = Yii::$app->factory->get( 'roleService' );

		$this->permissionService	= Yii::$app->factory->get( 'permissionService' );
		$this->hierarchyService		= Yii::$app->factory->get( 'modelHierarchyService' );
	}
1350953
public function display()
    {
        if (!$this->visible) {
            return;
        }

        if ($this->model === null) {
            return;
        }

        parent::display();

        if (
            count($this->model) === 0 &&
            $this->no_records_message !== null &&
            $this->show_check_all !== true
        ) {
            $div = new SwatHtmlTag('div');
            $div->class = 'swat-none';
            $div->setContent(
                $this->no_records_message,
                $this->no_records_message_type
            );

            $div->display();
            return;
        }

        $tile_view_tag = new SwatHtmlTag('div');
        $tile_view_tag->id = $this->id;
        $tile_view_tag->class = $this->getCSSClassString();
        $tile_view_tag->open();

        $this->displayTiles();

        if ($this->showCheckAll()) {
            $check_all = $this->getCompositeWidget('check_all');

            if ($this->check_all_title !== null) {
                $check_all->title = $this->check_all_title;
                $check_all->content_type = $this->check_all_content_type;
            }

            $check_all->extended_count = $this->check_all_extended_count;
            $check_all->visible_count = $this->check_all_visible_count;
            $check_all->unit = $this->check_all_unit;
            $check_all->display();
        }

        $clear_div_tag = new SwatHtmlTag('div');
        $clear_div_tag->class = 'swat-clear';
        $clear_div_tag->setContent('');
        $clear_div_tag->display();

        $tile_view_tag->close();

        Swat::displayInlineJavaScript($this->getInlineJavaScript());
    }
3823
public function init()
    {
        $this->_init();

        if ($this->id_field) {
            $this->addField($this->id_field, [
                'system'    => true,
            ]);
        }
    }
196097
public function process()
    {
        $this->getVisitor();
        $this->saveVisitor();

        if (!$this->visitor->hasUserId() && !Yii::$app->user->isGuest) {
            $this->visitor->setUserId(Yii::$app->user->identity->getId());
        }

        if ($this->detectFirstVisitSource) {

        }

        if ($this->detectAllVisitsSources) {

        }

        if ($this->storeLastActivity) {
            $this->visitor->save();
        }

        if ($this->storeVisitedPages) {

        }
    }
1142015
public function init()
    {
        parent::init();

        if (!$this->our_field) {
            $this->our_field = $this->link;
        }

        if (!$this->owner->hasField($this->our_field)) {
            $this->owner->addField($this->our_field, [
                'type'              => $this->type,
                'reference'         => $this,
                'system'            => $this->system,
                'join'              => $this->join,
                'default'           => $this->default,
                'never_persist'     => $this->never_persist,
                'read_only'         => $this->read_only,
                'caption'           => $this->caption,
                'ui'                => $this->ui,
                'mandatory'         => $this->mandatory,
                'required'          => $this->required,
                'typecast'          => $this->typecast,
                'serialize'         => $this->serialize,
                'persist_format'    => $this->persist_format,
                'persist_timezone'  => $this->persist_timezone,
                'dateTimeClass'     => $this->dateTimeClass,
                'dateTimeZoneClass' => $this->dateTimeZoneClass,
            ]);
        }
    }
1270424
function isA(publicAPI, model = {}, name = null) {
  if (!model.isA) {
    model.isA = [];
  }

  if (name) {
    model.isA.push(name);
  }

  if (!publicAPI.isA) {
    publicAPI.isA = (className) => model.isA.indexOf(className) !== -1;
  }
}
1043875
public function persistData()
    {
        $handlers = $this->getHandlers();

        foreach ($handlers as $handler) {
            /** @var $handler \Wurfl\Handlers\AbstractHandler */
            $handler->setLogger($this->logger);

            $handler->persistData();
        }
    }