code: public function getTypeOfAttribute($value)
      {
          if (!isset(self::$attributeTypes[$value])) {
              $statement = $this->connection->prepare('SELECT type FROM tl_metamodel_attribute WHERE id=? LIMIT 0,1');
              $statement->bindValue(1, $value);
              $statement->execute();
  
              self::$attributeTypes[$value] = $statement->fetch(\PDO::FETCH_OBJ)->type;
          }
  
          return self::$attributeTypes[$value];
      }
docs: Retrieve the type name from an attribute.
  
  @param int $value The id of an attribute.
  
  @return string
  
  @throws \Doctrine\DBAL\DBALException When an database error occurs.