Composable Commerce PHP SDKPHP SDK
  • Namespace
  • Class
  • Tree

Namespaces

  • Commercetools
    • Commons
      • Helper
    • Core
      • Builder
        • Request
        • Update
      • Cache
      • Client
        • Adapter
        • OAuth
      • Error
      • Helper
        • Annotate
        • State
          • Renderer
        • Subscriber
          • Log
      • Model
        • ApiClient
        • Cart
        • CartDiscount
        • Category
        • Channel
        • Common
        • Customer
        • CustomerGroup
        • CustomField
        • CustomObject
        • DiscountCode
        • Extension
        • Inventory
        • Message
        • Order
        • OrderEdit
        • Payment
        • Product
          • Search
        • ProductDiscount
        • ProductSelection
        • ProductType
        • Project
        • Review
        • ShippingMethod
        • ShoppingList
        • State
        • Store
        • Subscription
        • TaxCategory
        • Type
        • Zone
      • Request
        • ApiClients
        • CartDiscounts
          • Command
        • Carts
          • Command
        • Categories
          • Command
        • Channels
          • Command
        • CustomerGroups
          • Command
        • Customers
          • Command
        • CustomField
          • Command
        • CustomObjects
        • DiscountCodes
          • Command
        • Extensions
          • Command
        • GraphQL
        • InStores
        • Inventory
          • Command
        • Me
          • Command
        • Messages
        • OrderEdits
          • Command
          • StagedOrder
            • Command
        • Orders
          • Command
        • Payments
          • Command
        • ProductDiscounts
          • Command
        • Products
          • Command
        • ProductSelections
          • Command
        • ProductTypes
          • Command
        • Project
          • Command
        • Query
        • Reviews
          • Command
        • ShippingMethods
          • Command
        • ShoppingLists
          • Command
        • States
          • Command
        • Stores
          • Command
        • Subscriptions
          • Command
        • TaxCategories
          • Command
        • Types
          • Command
        • Zones
          • Command
      • Response

Classes

  • Category
  • CategoryCollection
  • CategoryDraft
  • CategoryReference
  • CategoryReferenceCollection

Class CategoryCollection

Commercetools\Core\Model\Common\AbstractJsonDeserializeObject implements Commercetools\Core\Model\Common\JsonDeserializeInterface, Commercetools\Core\Model\Common\ObjectTreeInterface uses Commercetools\Core\Model\Common\ObjectTreeTrait
Extended by Commercetools\Core\Model\Common\Collection implements Iterator, JsonSerializable, Countable, ArrayAccess uses Commercetools\Core\Model\Common\ContextTrait
Extended by Commercetools\Core\Model\Category\CategoryCollection
Namespace: Commercetools\Core\Model\Category
API documentation: https://docs.commercetools.com/http-api-projects-categories.html#category
Located at Core/Model/Category/CategoryCollection.php

Methods summary

public Commercetools\Core\Model\Category\Category|null
# getById( $id )

Parameters

$id

Returns

Commercetools\Core\Model\Category\Category|null

Overrides

Commercetools\Core\Model\Common\Collection::getById
public Commercetools\Core\Model\Category\Category|null
# getByKey( $key )

Parameters

$key

Returns

Commercetools\Core\Model\Category\Category|null
public Commercetools\Core\Model\Category\Category[]
# getRoots( )

Returns

Commercetools\Core\Model\Category\Category[]
public Commercetools\Core\Model\Category\Category[]
# getByParent( $parentId )

Parameters

$parentId

Returns

Commercetools\Core\Model\Category\Category[]
public Commercetools\Core\Model\Category\Category
# getBySlug( $slug, $locale )

Parameters

$slug
$locale

Returns

Commercetools\Core\Model\Category\Category

Methods inherited from Commercetools\Core\Model\Common\Collection

__construct(), add(), count(), current(), getAt(), getBy(), getType(), key(), next(), offsetExists(), offsetGet(), offsetSet(), offsetUnset(), rewind(), setAt(), toArray(), valid()

Methods inherited from Commercetools\Core\Model\Common\AbstractJsonDeserializeObject

__sleep(), fromArray(), jsonSerialize(), of()

Methods inherited from Commercetools\Core\Model\Common\ContextAwareInterface

getContext(), getContextCallback(), setContext(), setContextIfNull()

Methods inherited from Commercetools\Core\Model\Common\ObjectTreeInterface

parentSet(), rootGet(), rootSet()

Methods used from Commercetools\Core\Model\Common\ContextTrait

getContext(), getContextCallback(), setContext(), setContextIfNull()

Methods used from Commercetools\Core\Model\Common\ObjectTreeTrait

parentSet(), rootGet(), rootSet()

Magic methods summary

public Commercetools\Core\Model\Category\Category
# current( )

Returns

Commercetools\Core\Model\Category\Category

Overrides

Commercetools\Core\Model\Common\Collection::current
public Commercetools\Core\Model\Category\CategoryCollection
# add( Commercetools\Core\Model\Category\Category $element )

Parameters

$element

Returns

Commercetools\Core\Model\Category\CategoryCollection

Overrides

Commercetools\Core\Model\Common\Collection::add
public Commercetools\Core\Model\Category\Category
# getAt( $offset )

Parameters

$offset

Returns

Commercetools\Core\Model\Category\Category

Overrides

Commercetools\Core\Model\Common\Collection::getAt

Constants summary

string SLUG
# 'slug'
string PARENT
# 'parent'
string ROOTS
# 'roots'
string KEY
# 'key'

Constants inherited from Commercetools\Core\Model\Common\Collection

COLLECTION_TYPE, ID, TYPE_LIST, TYPE_MAP

Constants inherited from Commercetools\Core\Model\Common\AbstractJsonDeserializeObject

JSON_DESERIALIZE_INTERFACE, TYPEABLE_INTERFACE

PHP SDK API documentation generated by ApiGen