User Types

This service is used to manage one or many User Types.

find( $identifier )

Returns a User Type or null if not found.

ArgumentAcceptsDescription
$identifierstring, integer, User TypeA unique User Type identifier
{% set element = craft.organizations.userTypes.find(1) %}
{% set element = craft.organizations.userTypes.find('president') %}

findByCondition( $condition )

Returns a User Type or null if not found.

ArgumentAcceptsDescription
$conditionarrayA query 'where' condition
{% set element = craft.organizations.userTypes.findByCondition({
    handle: 'foo'
}) %}

findByCriteria( $criteria )

Returns a User Type or null if not found.

ArgumentAcceptsDescription
$criteriaarrayA query configuration
{% set element = craft.organizations.userTypes.findByCriteria({
    id: 1,
    indexBy: 'id'
}) %}

findAllByCondition( $condition )

Returns an array of User Types.

ArgumentAcceptsDescription
$conditionarrayA query 'where' condition
{% set elements = craft.organizations.userTypes.findAllByCondition({
    name: 'Foo'
}) %}

findAllByCriteria( $criteria )

Returns an array of User Types.

ArgumentAcceptsDescription
$criteriaarrayA query configuration
{% set element = craft.organizations.userTypes.findAllByCriteria({
    name: 'Foo',
    indexBy: 'id'
}) %}

getQuery( $criteria )

Returns a User Type Query.

ArgumentAcceptsDescription
$criteriaarrayA query configuration
{% set query = craft.organizations.userTypes.getQuery({
    name: 'Foo',
    indexBy: 'id'
}) %}