SIOC

 view release on metacpan or  search on metacpan

lib/SIOC/Space.pm  view on Meta::CPAN

extends 'SIOC';

### optional attributes

has 'parent' => (
    isa => 'SIOC::Space',
    is => 'rw',
);

has 'space_of' => (
    metaclass => 'Collection::Array',
    is => 'rw',
    isa => 'ArrayRef[SIOC]',
    default => sub { [] },
    provides => {
        'push' => 'make_space_of',
    },
);

has 'usergroups' => (
    isa => 'ArrayRef[SIOC::Usergroup]',
    metaclass => 'Collection::Array',
    is => 'rw',
    default => sub { [] },
    provides => {
        'push' => 'add_usergroup',
    },
);

### methods

after 'fill_template' => sub {
    my ($self) = @_;
    
    $self->set_template_var(parent => $self->parent);
    $self->set_template_var(usergroups => $self->usergroups);
    $self->set_template_var(space_of => $self->space_of);
};

1;
__END__

=head1 NAME

SIOC::Space -- SIOC Space class


=head1 VERSION

This documentation refers to SIOC::Space version 1.0.0.


=head1 SYNOPSIS

   use SIOC::Space;


=head1 DESCRIPTION

A Space is defined as being a place where data resides. It can be the location
for a set of Containers of content Items, e.g., on a Site, personal desktop,
shared filespace, etc. Any data object that resides on a particular Space can
be linked to it using the sioc:has_space property.


=head1 CLASS ATTRIBUTES

=over

=item parent 

A data Space which this resource is a part of.

=item space_of 

A resource which belongs to this data Space.

=item usergroups 

Points to Usergroups that have certain access to this Space.

=back


=head1 SUBROUTINES/METHODS

TODO: document methods


=head1 DIAGNOSTICS

For diagnostics information, see the SIOC base class.

=head1 CONFIGURATION AND ENVIRONMENT

This module doesn't need configuration.

=head1 DEPENDENCIES

This module depends on the following modules:

=over

=item *

Moose -- OOP framework (CPAN)

=item *

SIOC -- SIOC abstract base class (part of this module's distribution)

=back

=head1 INCOMPATIBILITIES

There are no known incompatibilities.

=head1 BUGS AND LIMITATIONS

There are no known bugs in this module.



( run in 2.086 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )