Skip to content

Latest commit

 

History

History
215 lines (151 loc) · 8.67 KB

README.md

File metadata and controls

215 lines (151 loc) · 8.67 KB

OA Core is the primary module for Open Atrium 2. It contains several submodules for different functionality. Most of these submodules are required and are split-out for code modularity. Some submodules are optional (will be indicated). Submodules are found in the oa_core/modules directory. Common utility functions are found in oa_core/includes and will be documented below.

Submodules (alphabetical)

Common Utility Functions

Located in oa_core/includes:

  • oa_core_util.inc - Always loaded. Contains many different and useful functions, such as returning the current space context, current section context, list of groups a user is a member of, etc. See the code file for PHPDOC documentation and comments.

  • oa_core_access.inc - Always loaded. Contains common access-control functions. All of the node grant and node access hooks are here, along with file_entity access. There is also a utility function to return all of the visibility information for a given node.

  • oa_core_login.inc - Always loaded. Contains the alter hooks to handle the user login redirection and the user dashboard. - oa_core_theme.inc - Always loaded. Contains the hook_theme function to point to various template files.

Content Types

The following core content types are provided by oa_core via Features export:

oa_space

An Organic Group "group type" for defining spaces or sub-spaces. Note sub-space functionality is handled by the Open Atrium Subspaces (oa_subspaces) module. Additional Base fields include:

  • field_oa_space_type - points to the Space Type (Space Blueprint) taxonomy. The Taxonomy term provides the default command buttons and panelizer layout for a given space type.

  • field_oa_section_override - allows custom command buttons to be enabled for the space to appear in the + menu. See Open Atrium Buttons (oa_buttons)

  • group_access - the Organic Groups field that allows spaces to be marked as Public/Private

  • group_group - the Organic Groups field that marks a Space as an OG Group type

  • og_roles_permissions - the Organic Groups field that allows space-specific roles and permissions

oa_group

An Organic Group "group type" for defining user access Groups. While OG supports assigning nodes to a group, Open Atrium only uses the user membership features to enable Groups to be used for access control on sections. Additional Base fields include:

  • group_access - the Organic Groups field that allows Groups to be marked as Public/Private

  • group_group - the Organic Groups field that marks a Group as an OG Group type

  • og_roles_permissions - the Organic Groups field that allows group-specific roles and permissions

Global Fields

The following Base fields are defined in oa_core for other content types to share:

  • field_oa_media - the file entity reference field used for attachments. oa_core implements custom access control over files assigned to this field based upon the node_access of the node being attached to.

Taxonomy

The following core taxonomies are defined:

space_type (Space Blueprint)

Used to define the default command buttons and panelizer layout for a particular space-type. Allows a space-type to clone an existing space structure via blueprints. Additional Base fields include:

  • field_oa_section_layout - stores the panelizer layout to be used for this space type

Views

The following views are exported into oa_core:

  • oa_core_space_types - a view used for the node/add/oa_space page to list the available space types for selection when creating content

  • open_atrium_content - a view of Recent Content. The most general purpose Views widget in Open Atrium allows most any type of content to be shown for a specific space and/or section

  • open_atrium_groups - a view of Spaces and Groups, typically added to the user's dashboard to show subscribed spaces. Has options for subscribed, favorites, inherited.

  • open_atrium_user_filters - provides a list of users of a given group. Used in other fields to restrict the user selection to the users of the current space (such as for teams)