Organization Type
You may access the following public properties and methods on an Organization Type.
# Public Properties
The following properties are available:
Property | Type | Description |
---|---|---|
id | integer (opens new window) | The organization type's Id |
handle | string (opens new window) | The organization type's reference name |
name | string (opens new window) | The organization type's human readable name |
fieldLayoutId | integer (opens new window), null (opens new window) | The organization type's layout Id |
uid | string (opens new window), null (opens new window) | The universally unique identifier |
dateCreated | DateTime (opens new window), null (opens new window) | The date the organization type was created |
dateUpdated | DateTime (opens new window), null (opens new window) | The date the organization type was last updated |
# Public Methods
The following methods are available:
# getFieldLayout()
Returns: Field Layout (opens new window)
::: code
{# Get an Organization Type #}
{% set object = craft.organizations.organizationTypes.get('technology') %}
{% set fieldLayout = object.getFieldLayout() %}
<p>{{ fieldLayout.id }}</p>
use flipbox\organizations\Organizations;
$object = Organizations::getInstance()->getOrganizationTypes()->get([
'handle' => 'technology'
]);
$fieldLayout = $object->getFieldLayout();
:::
# object.getSiteSettings()
Returns: an array of Organization Type Site Settings
::: code
{# Get an Organization Type #}
{% set object = craft.organizations.organizationTypes.find('technology') %}
{% set siteSettings = object.getSiteSettings() %}
<ul>
{% for site in siteSettings %}
<li>{{ site.hasUrls }} - {{ site.getUriFormat() }} - {{ site.getTemplate() }}</li>
{% endfor %}
</ul>
use flipbox\organizations\Organizations;
$object = Organizations::getInstance()->getOrganizationTypes()->get([
'handle' => 'technology'
]);
$siteSettings = $object->getSiteSettings();
foreach ($siteSettings as $site) {
// $site
}
:::