Skip to content
babichalex edited this page Feb 16, 2015 · 2 revisions

Description

Used for work with categories. Available creating subcategories with depth you need, adding images, management using dashboard crud.

Entity

  • id - entity primary key
  • name - category name
  • alias - category alias
  • parentId - id of parent category
  • path - category path (from root category to the lowermost level category)
  • order - category order
  • created - created timestamp
  • updated - last updated timestamp

Additional info

  • alias field must be unique for categories on the same level;
  • categories entity uses trait of Fury\Media\File, so you can add multiple images to any category;
  • parentId field is a self-referenced FK, so you can create categories with custom nesting levels;
  • treeBuild view helper is used for build categories tree for the root category;
  • path field is built automatically based on all parents from root category to the lowermost level one using updateChildrenPath() method in categories service;
  • you can get tree for some root category (by its alias) using getTreeForRoot($alias) method in categories service.

Clone this wiki locally