NAME

Modwheel::Object - Work with Modwheel data objects.

SYNOPSIS

# [....]
use Modwheel::Object;

my $object = Modwheel::Object->new({
    modwheel => $modwheel,
    db       => $db,
    user     => $user,
});

# fetch all objects in the top directory.
my @objects = $object->fetch(
    parent => Modwheel::Object::MW_CAT_TOP,
);

for my $child (@objects) {
    print $child->name, "\n";
}
    

DESCRIPTION

INHERITANCE

Modwheel::Object inherits from Modwheel::Instance.

SUBROUTINES/METHODS

ATTRIBUTES

->id
->set_id(int $id)
->parent
->set_parent(int $parent)
->name
->set_name(scalar $name)
->type
->set_type(scalar $type)
->description
->set_description(scalar $description)
->keywords
->set_keywords(scalar $keywords)
->data
->set_data(scalar $data)
->detach
->set_detach(int $detach)
->active
->set_active($bool_active)
->created
->set_created(scalar $created)
->changed
->set_changed(scalar $changed)
->owner
->set_owner(int $owner)
->groupo
->set_groupo(int $groupo)
->revised_by
->set_revised_by(int $revised_by)
->sort
->set_sort(int $sort)
->template
->set_template(scalar $template)

INSTANCE METHODS

->set_defaults()
->fetch(\%match, \@select, \%options, $opt_table)
->save()
->fetch_tree($id)
->webpath_to_id($path)
->expr_by_id($id)
->trash($id)
->empty_trash()
->create_tag($tag_name)
->get_tagid_by_name($tag_name)
->delete_tag($tag)
->connect_with_tag($tag, $objid)
->disconnect_from_tag($tag, $objid)
->get_all_tags()
->get_tags_for_object($objid)
->get_prototype_for_type($type)
->remove_prototype_for_type($type)
->create_prototype($type, \%fields)
->get_all_prototypes()
->traverse($id, \%opt_handlers, \@select, int $max_levels)

PRIVATE INSTANCE METHODS

->_find_bool_value()

EXPORT

MW_TREE_ROOT

Returns the id of the root directory.

MW_TREE_TRASH

Returns the id of the trash directory.

MW_TREE_NOPARENT

Returns the id of the directory the maintainance script moves objects without parent to.

ITERATE_TAGS_MAX

Maxiumum number of tags allowed.

DIAGNOSTICS

CONFIGURATION AND ENVIRONMENT

DEPENDENCIES

Params::Util
Perl6::Export::Attrs
Readonly
version

INCOMPATIBILITIES

None known.

BUGS AND LIMITATIONS

None known.

SEE ALSO

VERSION

v0.3.2

AUTHOR

Ask Solem, ask@0x61736b.net.

LICENSE AND COPYRIGHT

Copyright (C) 2007 by Ask Solem ask@0x61736b.net.

All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.