Evaluates attribute condition
@param array | object $row
@param array $config
@return bool
357017
protected function evaluateCondition($row, $config) {
		if (isset($this->condition))
			return call_user_func($this->condition, $row, $config);
		return true;
	}
1207495
protected function renderDataCellContent($row, $data)
    {
        $checked = CHtml::value($data, $this->name);
        $toggleOptions = $this->toggleOptions;
        $toggleOptions['icon'] = $checked === null
            ? $this->emptyIcon
            : ($checked
                ? $this->checkedIcon
                : $this->uncheckedIcon);

        $toggleOptions['url'] = isset($toggleOptions['url'])
            ? $this->evaluateExpression($toggleOptions['url'], array('data' => $data, 'row' => $row))
            : '#';

        if (!$this->displayText) {
            $htmlOptions = TbArray::getValue('htmlOptions', $this->toggleOptions, array());
            $htmlOptions['title'] = $this->getButtonLabel($checked);
            $htmlOptions['rel'] = 'tooltip';
            echo CHtml::link(TbHtml::icon($toggleOptions['icon']), $toggleOptions['url'], $htmlOptions);
        } else {
            echo TbHtml::button($this->getButtonLabel($checked), $toggleOptions);
        }
    }
380461
public function isVisible($row) {
        if (false === $this->visible) // check if it's visible
            return false;
        elseif (is_string($this->visible)) {
            $visible = true;
            eval("\$visible = {$this->visible};");
            if (false == $visible)
                return false;
        }
        return true;
    }
642531
function _validate_row_conditions ($row = array(), $conditions = null) {
		if ( !empty($row) ) {
			if ( !empty($conditions) ) {
				$conditions = (strpos($conditions, ' OR ') !== false) ? explode(' OR ', $conditions) : array($conditions) ;
				$or = '';
				foreach( $conditions as $key => $value ) {
					if ( strpos($value, ' AND ') !== false ) {
						$value = explode(' AND ', $value);
						$and = '';
						foreach( $value as $k => $v ) {
							$and .= $this->_validate_row_condition($row, $v);
						}
						$or .= (strpos($and, '0') !== false) ? '0' : '1' ;
					} else {
						$or .= $this->_validate_row_condition($row, $value);
					}
				}
				return (strpos($or, '1') !== false) ? true : false ;
			}
			return true;
		}
		return false;
	}
164005
protected function isDeletedRow($row, $attribute)
    {
        $rowAttribute = $row;
        unset($rowAttribute[$this->relationalData[$attribute]['junctionColumn']]);

        foreach ($this->relationalData[$attribute]['newRows'] as $newRow) {
            $newRowAttributes = $newRow;
            unset($newRowAttributes[$this->relationalData[$attribute]['junctionColumn']]);
            if ($newRowAttributes == $rowAttribute) {
                return false;
            }
        }

        return true;
    }
570317
public function select_row($table, $cond=null, $fields='*', $sort=null)
    {
    	return Sql::assistant( $this->ds )->select_row($table, $cond, $fields,  $sort);
    }
873505
protected function _prepareArrayRow(\Magento\Framework\DataObject $row)
    {
        $options = [];

        $options['option_' . $this->_getAttributeRenderer()->calcOptionHash(
            $row->getData('attribute')
        )]
            = 'selected="selected"';
        $options['option_' . $this->_getConditionsRenderer()->calcOptionHash(
            $row->getData('conditions')
        )]
            = 'selected="selected"';
        $options['option_' . $this->_getValueRenderer()->calcOptionHash(
            $row->getData('cvalue')
        )]
            = 'selected="selected"';

        $row->setData('option_extra_attrs', $options);
    }
1027678
public function translateRowValues($row, $key)
    {
        $row = parent::translateRowValues($row, $key);

        if (! $row) {
            return false;
        }
        
        // Default to active and can login
        if (!isset($row['gsf_active'])) {
            $row['gsf_active'] = 1;
        }        
        if (!isset($row['gul_can_login'])) {
            $row['gul_can_login'] = 1;
        }
        
        // Make sure we have an organization
        if (!isset($row['gsf_id_organization'])) {
            $row['gsf_id_organization'] = $this->_organization->getId();
        }
        
        // Use organization default userclass is not specified
        if (!isset($row['gul_user_class'])) {
            $row['gul_user_class'] = $this->loader->getUserLoader()->getOrganization($row['gsf_id_organization'])->get('gor_user_class');
        }

        return $row;
    }
583713
protected function getAttributesString(array $row)
    {
        $attributes = [];
        foreach ($this->getAttributes() as $attrKey => $attrValue) {
            if ('href' === $attrKey) {
                $attrValue = $this->getLinkReplaced($row);
            }
            $attributes[] = $attrKey.'="'.$attrValue.'"';
        }

        return implode(' ', $attributes);
    }
1359402
public function doesConditionApply(Config\Condition $config) : bool
    {
        $condition = $this->createCondition($config);
        return $condition->isTrue($this->io, $this->repository);
    }
98827
public function execute($row, $name = null)
    {
        parent::execute($row, $name);
        return $row[MemberNames::PRODUCT_SUPER_ATTRIBUTE_ID];
    }
142753
public function isDisplayed(array $row)
    {
        if ($this->hasShowOnValues() === false) {
            return true;
        }

        $isDisplayed = false;
        foreach ($this->getShowOnValues() as $rule) {
            $value = '';
            if (isset($row[$rule['column']->getUniqueId()])) {
                $value = $row[$rule['column']->getUniqueId()];
            }

            if ($rule['value'] instanceof AbstractColumn) {
                if (isset($row[$rule['value']->getUniqueId()])) {
                    $ruleValue = $row[$rule['value']->getUniqueId()];
                } else {
                    $ruleValue = '';
                }
            } else {
                $ruleValue = $rule['value'];
            }

            $isDisplayedMatch = Filter::isApply($value, $ruleValue, $rule['comparison']);
            if ($this->getShowOnValueOperator() == 'OR' && true === $isDisplayedMatch) {
                // For OR one match is enough
                return true;
            } elseif ($this->getShowOnValueOperator() == 'AND' && false === $isDisplayedMatch) {
                return false;
            } else {
                $isDisplayed = $isDisplayedMatch;
            }
        }

        return $isDisplayed;
    }
589928
public function isEditable(Row $row = null)
	{
		return ((bool) $this->getEditableCallback())
			&& ($row === null || $this->getEditableOnConditionCallback() === null || call_user_func_array($this->getEditableOnConditionCallback(), [$row->getItem()]));
	}
85654
protected function checkRow(array $row) {
		foreach ($row as $column => $str) {
			$width = Colors::width( $str, $this->isAsciiPreColorized( $column ) );
			if (!isset($this->_width[$column]) || $width > $this->_width[$column]) {
				$this->_width[$column] = $width;
			}
		}

		return $row;
	}
1017491
protected function isValidData($config)
    {
        $valid = true;
        foreach ($config as $k => $v) {
            if (!($this->isValidKey($k) && $this->isValidValue($v))) {
                $valid = false;
                break;
            }
        }
        return $valid;
    }
759877
public function castRow($row)
    {
        $outRow = [];
        $validationErrors = [];
        foreach ($this->fields() as $fieldName => $field) {
            $value = array_key_exists($fieldName, $row) ? $row[$fieldName] : null;
            if (in_array($value, $this->missingValues())) {
                $value = null;
            }
            try {
                $outRow[$fieldName] = $field->castValue($value);
            } catch (Exceptions\FieldValidationException $e) {
                $validationErrors = array_merge($validationErrors, $e->validationErrors);
            }
        }
        if (count($validationErrors) > 0) {
            throw new Exceptions\FieldValidationException($validationErrors);
        }

        return $outRow;
    }
1080265
public function validateRowValues(array $row, $key)
    {
        $row = parent::validateRowValues($row, $key);

        $token = $this->loader->getTracker()->getToken($row['token'] ? $row['token'] : 'emptytoken');

        if ($token->exists) {
            // If token is not completed we can use it, otherwise it depends on the settings
            if ($token->isCompleted()) {
                switch ($this->getTokenCompleted()) {
                    case self::TOKEN_SKIP:
                        return false;

                    case self::TOKEN_ERROR:
                        $this->_addErrors(sprintf(
                                $this->_('Token %s is completed.'),
                                $token->getTokenId()
                                ), $key);
                        break;

                    // Intentional fall-through,
                    // other case are handled in SaveAnswerTask
                }
            }
        } else {
            switch ($this->getNoToken()) {
                case self::TOKEN_SKIP:
                    return false;

                case self::TOKEN_ERROR:
                    $this->_addErrors($this->getNoTokenError($row, $key), $key);
                    break;

                default:
                    $respTrack = $this->findRespondentTrackFor($row);

                    if ($respTrack) {
                        $row['resp_track_id'] == $respTrack;
                    } else {
                        $this->_addErrors(sprintf(
                                $this->_('No track for inserting found for %s.'),
                                implode(" / ", $row)
                                ), $key);
                    }
            }
        }

        return $row;
    }