src/TSFlaggedActiveRecord.php
public function withFlag($flag)
    {
        $flagValue = (is_string($flag)) ? $this->flagsFromText($flag) : $flag;

        if ($flagValue) {
            $this->getDbCriteria()->mergeWith(array(
                'condition' => $this->getTableAlias() . '.' . $this->flagsField . '&' . $flagValue . '<>0', //:flag<>0',
            ));
        }
        return $this;
    }
public function withFlag($flag)
    {
        $flagValue = (is_string($flag)) ? $this->flagsFromText($flag) : $flag;

        if ($flagValue) {
            $this->getDbCriteria()->mergeWith(array(
                'condition' => $this->getTableAlias() . '.' . $this->flagsField . '&' . $flagValue . '<>0', //:flag<>0',
            ));
        }
        return $this;
    }
public function withFlag ( $ flag ) { $ flagValue = ( is_string ( $ flag ) ) ? $ this -> flagsFromText ( $ flag ) : $ flag ; if ( $ flagValue ) { $ this -> getDbCriteria ( ) -> mergeWith ( array ( 'condition' => $ this -> getTableAlias ( ) . '.' . $ this -> flagsField . '&' . $ flagValue . '<>0' , //:flag<>0', ) ) ; } return $ this ; }
Scope for select records with given flag
@param mixed $flag the flag value or flag name
@return instancetype
Scope for select records with given flag