public function buildSummaryBlock($errors = null)
    {
        $div = new XMLElement('div');

        // Publish label
        $label = Widget::Label(__('Label'));
        $label->appendChild(
            Widget::Input('fields['.$this->get('sortorder').'][label]', $this->get('label'))
        );
        if (isset($errors['label'])) {
            $div->appendChild(Widget::Error($label, $errors['label']));
        } else {
            $div->appendChild($label);
        }

        // Handle + placement
        $group = new XMLElement('div');
        $group->setAttribute('class', 'two columns');

        $label = Widget::Label(__('Handle'));
        $label->setAttribute('class', 'column');

        $label->appendChild(Widget::Input('fields['.$this->get('sortorder').'][element_name]', $this->get('element_name')));

        if (isset($errors['element_name'])) {
            $group->appendChild(Widget::Error($label, $errors['element_name']));
        } else {
            $group->appendChild($label);
        }

        // Location
        $group->appendChild($this->buildLocationSelect($this->get('location'), 'fields['.$this->get('sortorder').'][location]'));

        $div->appendChild($group);

        return $div;
    }
public function buildSummaryBlock($errors = null)
    {
        $div = new XMLElement('div');

        // Publish label
        $label = Widget::Label(__('Label'));
        $label->appendChild(
            Widget::Input('fields['.$this->get('sortorder').'][label]', $this->get('label'))
        );
        if (isset($errors['label'])) {
            $div->appendChild(Widget::Error($label, $errors['label']));
        } else {
            $div->appendChild($label);
        }

        // Handle + placement
        $group = new XMLElement('div');
        $group->setAttribute('class', 'two columns');

        $label = Widget::Label(__('Handle'));
        $label->setAttribute('class', 'column');

        $label->appendChild(Widget::Input('fields['.$this->get('sortorder').'][element_name]', $this->get('element_name')));

        if (isset($errors['element_name'])) {
            $group->appendChild(Widget::Error($label, $errors['element_name']));
        } else {
            $group->appendChild($label);
        }

        // Location
        $group->appendChild($this->buildLocationSelect($this->get('location'), 'fields['.$this->get('sortorder').'][location]'));

        $div->appendChild($group);

        return $div;
    }
public function buildSummaryBlock ( $ errors = null ) { $ div = new XMLElement ( 'div' ) ; // Publish label $ label = Widget :: Label ( __ ( 'Label' ) ) ; $ label -> appendChild ( Widget :: Input ( 'fields[' . $ this -> get ( 'sortorder' ) . '][label]' , $ this -> get ( 'label' ) ) ) ; if ( isset ( $ errors [ 'label' ] ) ) { $ div -> appendChild ( Widget :: Error ( $ label , $ errors [ 'label' ] ) ) ; } else { $ div -> appendChild ( $ label ) ; } // Handle + placement $ group = new XMLElement ( 'div' ) ; $ group -> setAttribute ( 'class' , 'two columns' ) ; $ label = Widget :: Label ( __ ( 'Handle' ) ) ; $ label -> setAttribute ( 'class' , 'column' ) ; $ label -> appendChild ( Widget :: Input ( 'fields[' . $ this -> get ( 'sortorder' ) . '][element_name]' , $ this -> get ( 'element_name' ) ) ) ; if ( isset ( $ errors [ 'element_name' ] ) ) { $ group -> appendChild ( Widget :: Error ( $ label , $ errors [ 'element_name' ] ) ) ; } else { $ group -> appendChild ( $ label ) ; } // Location $ group -> appendChild ( $ this -> buildLocationSelect ( $ this -> get ( 'location' ) , 'fields[' . $ this -> get ( 'sortorder' ) . '][location]' ) ) ; $ div -> appendChild ( $ group ) ; return $ div ; }
Construct the html block to display a summary of this field, which is the field
Label and it's location within the section. Any error messages generated are
appended to the optional input error array. This function calls
`buildLocationSelect` once it is completed

@see buildLocationSelect()
@param array $errors (optional)
an array to append html formatted error messages to. this defaults to null.
@throws InvalidArgumentException
@return XMLElement
the root XML element of the html display of this.
Construct the html block to display a summary of this field which is the field Label and it s location within the section . Any error messages generated are appended to the optional input error array . This function calls buildLocationSelect once it is completed