protected function validateField($field = null)
    {
        $field = $field ?: post(self::PARAM_FIELD);

        if ($field && $field != $this->field) {
            $this->initRelation($this->model, $field);
        }

        if (!$field && !$this->field) {
            throw new ApplicationException(Lang::get('backend::lang.relation.missing_definition', compact('field')));
        }

        return $field ?: $this->field;
    }
protected function validateField($field = null)
    {
        $field = $field ?: post(self::PARAM_FIELD);

        if ($field && $field != $this->field) {
            $this->initRelation($this->model, $field);
        }

        if (!$field && !$this->field) {
            throw new ApplicationException(Lang::get('backend::lang.relation.missing_definition', compact('field')));
        }

        return $field ?: $this->field;
    }
protected function validateField ( $ field = null ) { $ field = $ field ? : post ( self :: PARAM_FIELD ) ; if ( $ field && $ field != $ this -> field ) { $ this -> initRelation ( $ this -> model , $ field ) ; } if ( ! $ field && ! $ this -> field ) { throw new ApplicationException ( Lang :: get ( 'backend::lang.relation.missing_definition' , compact ( 'field' ) ) ) ; } return $ field ? : $ this -> field ; }
Validates the supplied field and initializes the relation manager.
@param string $field The relationship field.
@return string The active field name.
Validates the supplied field and initializes the relation manager .