Elgg\Database\SubtypeTable::remove PHP Method

remove() public method

Removes a registered \ElggEntity type, subtype, and classname.
See also: add_subtype()
See also: update_subtype()
public remove ( string $type, string $subtype ) : boolean
$type string Type
$subtype string Subtype
return boolean
    public function remove($type, $subtype)
    {
        $sql = "\n\t\t\tDELETE FROM {$this->db->prefix}entity_subtypes\n\t\t\tWHERE type = :type AND subtype = :subtype\n\t\t";
        $params = [':type' => $type, ':subtype' => $subtype];
        if (!$this->db->deleteData($sql, $params)) {
            return false;
        }
        $this->invalidateCache();
        return true;
    }