code: private function getFilteredAttributeNames($metaModelId, $allowedTypes = array())
      {
          $attributeNames = array();
  
          if ($metaModel = $this->factory->getMetaModel($this->factory->translateIdToMetaModelName($metaModelId))) {
              foreach ($metaModel->getAttributes() as $attribute) {
                  if (empty($allowedTypes) || in_array($attribute->get('type'), $allowedTypes)) {
                      $attributeNames[$attribute->getColName()] =
                          sprintf(
                              '%s [%s]',
                              $attribute->getName(),
                              $attribute->getColName()
                          );
                  }
              }
          }
  
          return $attributeNames;
      }
docs: Get a list with all allowed attributes for meta description.
  
  If the optional parameter arrTypes is not given, all attributes will be retrieved.
  
  @param int      $metaModelId  The id of the MetaModel from which the attributes shall be retrieved from.
  
  @param string[] $allowedTypes The attribute type names that shall be retrieved (optional).
  
  @return array A list with all found attributes.