Elgg\Database\SubtypeTable::getSubtype PHP Method

getSubtype() public method

Gets the denormalized string for a given subtype ID.
See also: get_subtype_id()
public getSubtype ( integer $subtype_id ) : string | false
$subtype_id integer Subtype ID from database
return string | false Subtype name, false if subtype not found
    public function getSubtype($subtype_id)
    {
        if (!$subtype_id) {
            return '';
        }
        $cache = $this->getPopulatedCache();
        return isset($cache[$subtype_id]) ? $cache[$subtype_id]->subtype : false;
    }