Organization Type Site Settings

You may access the following public properties and methods on an Organization Type Site Settings.

# Public Properties

The following properties are available:

Property Type Description
typeId integer (opens new window) The organization's state (custom defined)
siteId integer (opens new window) The date the organization joined
hasUrls boolean (opens new window) The date the organization joined
uriFormat string (opens new window), null (opens new window) The date the organization joined
template string (opens new window), null (opens new window) The date the organization joined

# Public Methods

The following methods are available:

# getSite()

Returns: Site (opens new window)

::: code

{# Get an Organization Type #}
{% set object = craft.organizations.organizationTypes.get('technology') %}
{% set siteSettings = object.getSiteSettings() %}
<ul>
{% for settings in siteSettings %}
    {% set site = settings.getSite() %}
    <li>{{ site.id }} - {{ site.name }}</li>
{% endfor %}
</ul>
use flipbox\organizations\Organizations;

$object = Organizations::getInstance()->getOrganizationTypes()->get([
    'handle' => 'technology'
]);

$siteSettings = $object->getSiteSettings();

foreach ($siteSettings as $settings) {
    $site = $settings->getSite();
}

:::

# getType()

Returns: Organization Type

::: code

{# Get an Organization Type #}
{% set object = craft.organizations.organizationTypes.get('technology') %}
{% set siteSettings = object.getSiteSettings() %}
<ul>
{% for settings in siteSettings %}
    {% set type = settings.getType() %}
    <li>{{ type.id }} - {{ type.handle }}</li>
{% endfor %}
</ul>
use flipbox\organizations\Organizations;

$object = Organizations::getInstance()->getOrganizationTypes()->get([
    'handle' => 'technology'
]);

$siteSettings = $object->getSiteSettings();

foreach ($siteSettings as $settings) {
    $type = $settings->getType();
}

:::

# hasUrls()

Returns: boolean (opens new window)

::: code

{# Get an Organization Type #}
{% set object = craft.organizations.organizationTypes.get('technology') %}
{% set siteSettings = object.getSiteSettings() %}
<ul>
{% for settings in siteSettings %}
    <li>
        {% if settings.hasUrls %}
            {{ settings.uriFormat }} - {{ settings.template }}
        {% else %}
            No Url
        {% endif %}
    </li>
{% endfor %}
</ul>
use flipbox\organizations\Organizations;

$object = Organizations::getInstance()->getOrganizationTypes()->get([
    'handle' => 'technology'
]);

$siteSettings = $object->getSiteSettings();

foreach ($siteSettings as $settings) {
    if ($settings->hasUrls()) {
        // Do something w/ url
    } else {
        // Do something w/ out url    
    }
}

:::