MetaModels\BackendIntegration\InputScreen\InputScreen::translateProperty PHP Method

translateProperty() protected method

Translate a property.
protected translateProperty ( array $property, MetaModels\IMetaModel $metaModel, string $legend ) : boolean
$property array The property information to transform.
$metaModel MetaModels\IMetaModel The MetaModel the property belongs to.
$legend string The legend the property belongs to.
return boolean
    protected function translateProperty($property, $metaModel, $legend)
    {
        $attribute = $metaModel->getAttributeById($property['attr_id']);
        // Dead meat.
        if (!$attribute) {
            return false;
        }
        $propName = $attribute->getColName();
        $this->legends[$legend]['properties'][] = $propName;
        $this->properties[$propName] = array('info' => $attribute->getFieldDefinition($property));
        return true;
    }