Tiger_Model_Org

@api · extends Tiger_Model_Table

Org — the TENANT.

An Org is the unit of tenancy in Tiger. Everything a customer owns hangs off an org, and cross-tenant isolation is enforced by the org_user membership table (see Tiger_Model_OrgUser), NOT by anything on this row.

Orgs form a hierarchy via the self-referential parent_org_id (null = a root org). This supports parent/child structures — e.g. an enterprise with departments, or a reseller with sub-accounts — without a separate table. Keep the Org row THIN: it's identity + hierarchy + status only. Anything richer (billing profile, branding, settings) belongs to a MODULE that extends Org via its own FK-linked table, or to the org-scoped config layer — never new columns here, so the platform stays updatable.

Methods

findBySlug()

findBySlug($slug)

Find an org by its URL-safe slug (the human/route-facing identifier).

  • $slug string

Returns Zend_Db_Table_Row_Abstract|null

children()

children($orgId)

Direct children of an org (one level down the hierarchy).

  • $orgId string

Returns Zend_Db_Table_Rowset_Abstract

datatable()

datatable(array $opts)

DataTables data for the Organizations admin: org + parent name + a live member count (via org_user). Owns the query; the service handles presentation + ACL.

  • $opts array

Returns array{total:int,filtered:int,rows:array}

slugTaken()

slugTaken($slug, $excludeId = null)

Is $slug already used by a different, non-deleted org?

  • $slug string — the slug to check
  • $excludeId string|null — an org id to exclude (e.g. the org being edited)

Returns bool — true if the slug is taken by another live org