Overview

Namespaces

  • Charcoal
    • Object
    • User
      • Acl

Classes

  • Content
  • ObjectRevision
  • ObjectRoute
  • ObjectSchedule
  • UserData

Interfaces

  • ArchivableInterface
  • CategorizableInterface
  • CategorizableMultipleInterface
  • CategoryInterface
  • ContentInterface
  • HierarchicalInterface
  • ObjectRevisionInterface
  • ObjectRouteInterface
  • ObjectScheduleInterface
  • PublishableInterface
  • RevisionableInterface
  • RoutableInterface
  • UserDataInterface

Traits

  • ArchivableTrait
  • CategorizableMultipleTrait
  • CategorizableTrait
  • CategoryTrait
  • HierarchicalTrait
  • PublishableTrait
  • RevisionableTrait
  • RoutableTrait
  • Overview
  • Namespace
  • Class

Trait CategorizableTrait

Categorizable defines objects that can be associated to a category.

Basic implementation of Charcoal\Object\CategorizableInterface.

Direct Known Users

Charcoal\User\Acl\Permission
Namespace: Charcoal\Object
See: \Charcoal\Object\CategoryInterface Accepted interface.
See: \Charcoal\Object\CategorizableMultipleTrait For objects that can to one or more categories.
Located at Charcoal/Object/CategorizableTrait.php
Methods summary
public Charcoal\Object\CategorizableInterface
# setCategoryType( string $type )

Set the type of category the object can belong to.

Set the type of category the object can belong to.

Parameters

$type
The category type.

Returns

Charcoal\Object\CategorizableInterface
Chainable

Throws

InvalidArgumentException
If the type argument is not a string.
public string
# categoryType( )

Retrieve the type of category the object can belong to.

Retrieve the type of category the object can belong to.

Returns

string
public Charcoal\Object\CategorizableInterface
# setCategory( mixed $category )

Set the category the object belongs to.

Set the category the object belongs to.

Parameters

$category
The object's category.

Returns

Charcoal\Object\CategorizableInterface
Chainable
public mixed
# category( )

Retrieve the category the object belongs to.

Retrieve the category the object belongs to.

Returns

mixed
Properties summary
protected mixed|Charcoal\Object\CategoryInterface $category

The category the object belongs to.

The category the object belongs to.

#
API documentation generated by ApiGen