Match and render the sucessfull value.

Checks the given list if it has the given value in its list items.

@param string $value List item value
@param string $list Name of the list
@return void
4465
public function renderValue(string $value, string $list) : void
    {
        /**
         * @var \CsvMigrations\Model\Table\DblistsTable
         */
        $table = $this->loadModel('CsvMigrations.Dblists');
        $this->_createList($list);

        $query = $table->find()
            ->enableHydration(true)
            ->where([$table->aliasField('name') => $list])
            ->matching('DblistItems', function ($q) use ($value) {
                return $q->where(['DblistItems.value' => $value]);
            });

        try {
            $entity = $query->firstOrFail();
        } catch (RecordNotFoundException $e) {
            $this->set('data', '' !== trim($value) ? sprintf(ListRenderer::VALUE_NOT_FOUND_HTML, $value) : '');

            return;
        }

        Assert::isInstanceOf($entity, EntityInterface::class);
        $this->set('data', $entity->get('_matchingData')['DblistItems']->get('name'));
    }
81859
public function setIgnorePatterns( $list )
	{
		$this->ignorePatterns	= array();
		foreach( array_value( $list ) as $pattern)
			$this->addIgnorePattern( $pattern );	
	}
1257300
private function checkValueIsValidOrThrowException($value)
    {
        if (!\is_array($value) || 1 !== \count($value)) {
            throw new FilterErrorException(
                'Condition parsing failed for "'
                . var_export($value, true)
                . '", it should be something like: "isEqualTo" : "a value"'
            );
        }
    }
370904
private static function checkContains(array $list) : bool
    {
        $comp = A\compose(A\flatten, function (array $val) {
            return in_array(true, $val);
        });
        return $comp($list);
    }
505780
private function check($value) {

		$values = ['yes', 'on', '1', 'true'];
		
		if(true === is_string($value)) {
			return true === in_array($value, $values);
		}

		return false;
	}
94006
protected function onSetFormValue(string $value): void
    {
        foreach ($this->options as $option) {
            $isMatch = ($value === $option->getValue());
            $option->setSelected($isMatch);

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

        parent::onSetFormValue($value);
    }
558123
public function checkValue(&$value)
    {
        if (parent::checkValue($value) === true) {
            if (!preg_match('/^(?:from|to|(?:\d{1,2}|100)%)$/D', $value)) {
                $this->setIsValid(false);
                $this->addValidationError("Invalid value '$value' for the keyframe selector.");

                return false;
            }
            return true;
        }

        return false;
    }
82324
public function updateList(&$list){
		if($this->modelIsMultiSitesAware()){
			$site = $this->getActiveSite();
			if ($site) {
				$list = $list->filter('SiteID', $site->ID);
			}
		}
	}
779225
private function resolveComponent(&$value)
    {
        if (\is_string($value) && strpos($value, '@') === 0) {
            $value = $this->getComponent(substr($value, 1));
        }
    }
801557
public static function checkEmpty($value)
    {
        if (!isset($value)){
            return true;
        }

        if ($value === null){
            return true;
        }

        if (trim($value) === "") {
            return true;
        }

        return false;
    }
788224
public function isValueValid($value) {
		return $value instanceof Type\ListItem || $value instanceof DataType\TextType || $value instanceof Type\Thing;
	}
1362174
public function checkValue(&$value)
    {
        if (is_string($value)) {
            $value = Placeholder::replaceStringsAndComments($value);
            $value = Placeholder::removeCommentPlaceholders($value, true);
            $value = Placeholder::replaceStringPlaceholders($value, true);
            $value = trim($value);

            if ($value !== '') {
                return true;
            } else {
                $this->setIsValid(false);
            }
        } else {
            throw new \InvalidArgumentException(
                "Invalid type '" . gettype($value). "' for argument 'value' given."
            );
        }
    }
1098392
public function filter($value)
    {
        return in_array($value, $this->getList(), $this->getStrict()) ? $value : null;
    }
628473
protected function prepareListPage(array &$list)
    {
        foreach ($list as &$item) {
            $this->setItemUrlEntity($item, $this->store, 'page');
        }
    }
1011301
public function push($value)
    {
        $this->checkType($value);
        $data = &$this->getDataPlaceHolder();
        array_push($data, $value);
    }
134617
function(list, value) {
      if (_.isArray(list)) {
        for (var i = 0; i < list.length; i++) {
          var listItem = list[i];
          if (listItem.indexOf(value) === 0) {
            return true;
          }
        }
      } else {
        if (list.indexOf(value) === 0) {
          return true;
        }
      }
      return false;
    }
278162
public function verifyListIsEmpty(): void
    {
        $firstRowValue = $this->adminLists['Content items']->table->getCellValue(1, 1);

        if (
        !($this->adminLists['Content items']->table->getItemCount() === 1 &&
            strpos($firstRowValue, 'No content items.') !== false)
        ) {
            throw new \Exception('"Content items" list is not empty.');
        }
    }