AdminPageFramework_FieldType_taxonomy::getField PHP Метод

getField() защищенный Метод

protected getField ( $aField )
    protected function getField($aField)
    {
        $aField['label_no_term_found'] = $this->getElement($aField, 'label_no_term_found', $this->oMsg->get('no_term_found'));
        $_aTabs = array();
        $_aCheckboxes = array();
        foreach ($this->getAsArray($aField['taxonomy_slugs']) as $_isKey => $_sTaxonomySlug) {
            $_aAssociatedDataAttributes = $this->_getDataAttributesOfAssociatedPostTypes($_sTaxonomySlug, $this->_getPostTypesByTaxonomySlug($_sTaxonomySlug));
            $_aTabs[] = $this->_getTaxonomyTab($aField, $_isKey, $_sTaxonomySlug, $_aAssociatedDataAttributes);
            $_aCheckboxes[] = $this->_getTaxonomyCheckboxes($aField, $_isKey, $_sTaxonomySlug, $_aAssociatedDataAttributes);
        }
        return "<div id='tabbox-{$aField['field_id']}' class='tab-box-container categorydiv' style='max-width:{$aField['max_width']};'>" . "<ul class='tab-box-tabs category-tabs'>" . implode(PHP_EOL, $_aTabs) . "</ul>" . "<div class='tab-box-contents-container'>" . "<div class='tab-box-contents' style='height: {$aField['height']};'>" . implode(PHP_EOL, $_aCheckboxes) . "</div>" . "</div>" . "</div>";
    }

Usage Example

 /**
  * Returns the output of the field type.
  */
 public function getField($aField)
 {
     $_sOutput = '';
     // Post type check boxes.
     $_aField = $this->_getPostTypeFieldArguments($aField);
     $_sOutput .= $this->getFieldOutput($_aField);
     // Taxonomy term check-boxes
     $_aField = $this->_getTaxonomyFieldArguments($aField);
     $_sOutput .= parent::getField($_aField);
     // Remove the repeatable button place holders embedded with the parent methods.
     $_sOutput = str_replace("<div class='repeatable-field-buttons'></div>", '', $_sOutput);
     return "<div class='repeatable-field-buttons'></div>" . $_sOutput;
 }