public function handleField(Field $field)
    {
        $prefix = $this->prefix . strtoupper($field->name);

        if (!isset($field->label)) {
            $field->label = $prefix . '_LABEL';
        }

        if (preg_match('~^([A-Z_]+)$~', $field->label, $match)) {
            $prefix = $match[1];
        }

        if (preg_match('~^([A-Z_]+?)_LABEL$~', $field->label, $match)) {
            $prefix = $match[1];
        }

        if (!isset($field->description)) {
            $field->description = $prefix . '_DESC';
        }

        if (preg_match('~^([A-Z_]+?)_DESC$~', $field->description, $match)) {
            $prefix = $match[1];
        }

        if (!isset($field->hint)) {
            $field->hint = $prefix . '_HINT';
        }

        if (!isset($field->role)) {
            if (isset($this->special[$field->name])) {
                $field->role = $this->special[$field->name];
            }
        }

        if (isset($field->role)) {
            $this->fieldAliases[$field->role] = $field->name;
        }

        $this->reflector->addField($field);
    }
public function handleField(Field $field)
    {
        $prefix = $this->prefix . strtoupper($field->name);

        if (!isset($field->label)) {
            $field->label = $prefix . '_LABEL';
        }

        if (preg_match('~^([A-Z_]+)$~', $field->label, $match)) {
            $prefix = $match[1];
        }

        if (preg_match('~^([A-Z_]+?)_LABEL$~', $field->label, $match)) {
            $prefix = $match[1];
        }

        if (!isset($field->description)) {
            $field->description = $prefix . '_DESC';
        }

        if (preg_match('~^([A-Z_]+?)_DESC$~', $field->description, $match)) {
            $prefix = $match[1];
        }

        if (!isset($field->hint)) {
            $field->hint = $prefix . '_HINT';
        }

        if (!isset($field->role)) {
            if (isset($this->special[$field->name])) {
                $field->role = $this->special[$field->name];
            }
        }

        if (isset($field->role)) {
            $this->fieldAliases[$field->role] = $field->name;
        }

        $this->reflector->addField($field);
    }
public function handleField ( Field $ field ) { $ prefix = $ this -> prefix . strtoupper ( $ field -> name ) ; if ( ! isset ( $ field -> label ) ) { $ field -> label = $ prefix . '_LABEL' ; } if ( preg_match ( '~^([A-Z_]+)$~' , $ field -> label , $ match ) ) { $ prefix = $ match [ 1 ] ; } if ( preg_match ( '~^([A-Z_]+?)_LABEL$~' , $ field -> label , $ match ) ) { $ prefix = $ match [ 1 ] ; } if ( ! isset ( $ field -> description ) ) { $ field -> description = $ prefix . '_DESC' ; } if ( preg_match ( '~^([A-Z_]+?)_DESC$~' , $ field -> description , $ match ) ) { $ prefix = $ match [ 1 ] ; } if ( ! isset ( $ field -> hint ) ) { $ field -> hint = $ prefix . '_HINT' ; } if ( ! isset ( $ field -> role ) ) { if ( isset ( $ this -> special [ $ field -> name ] ) ) { $ field -> role = $ this -> special [ $ field -> name ] ; } } if ( isset ( $ field -> role ) ) { $ this -> fieldAliases [ $ field -> role ] = $ field -> name ; } $ this -> reflector -> addField ( $ field ) ; }
Parser callback for onAfterField event

@internal

@param   Field $field The data structure

@return  void
Parser callback for onAfterField event