/**
* Retrieves the UCM type ID
*
* @param string $alias The string of the type alias
*
* @return mixed The ID of the requested type or false if type is not found
*
* @since 3.1
*/
public function getTypeId($alias = null)
{
if (!$alias) {
$alias = $this->alias;
}
$query = $this->db->getQuery(true)->select($this->db->quoteName('ct.type_id'))->from($this->db->quoteName('#__content_types', 'ct'))->where($this->db->quoteName('ct.type_alias') . ' = :alias')->bind(':alias', $alias);
$this->db->setQuery($query);
$id = $this->db->loadResult();
if (!$id) {
return false;
}
return $id;
}