@startuml
skinparam handwritten true
hide circle
skinparam classAttributeIconSize 0

title コンテンツ管理

class Admin\ContentsController {
  + AuthenticationComponent
  + BcMessageComponent
  + BcContentsComponent
  + コンテンツ一覧表示 : index()
  + ゴミ箱一覧表示 : trash_index()
  + ゴミ箱をもとに戻す : trash_return()
  + コンテンツ編集 : edit()
  + エイリアス編集 : edit_alias()
  + コンテンツ削除 : delete()
  + 一括処理(公開・非公開・削除) : batch()
  + ゴミ箱を空にする : trash_empty()
}

class BcAdminContentsComponent {
  + setupAdmin()
  + settingForm()
  + beforeRender()
}

class BcFrontContentsComponent {
  + setupFront()
  + getCrumbs()
}

class BcAdminContentHelper {
  + getUserList()
  + getListTypes()
  + getSites()
  + getContentFolderList()
  + setup()
  + isActionAvailable()
  - _getExistsTitles()
  - _getIconUrl()
  + getJsonSettings()
  + isEditable()
  + getCurrentFolderLinkedUrl()
  + getFolderLinkedUrl()
}

class BcContentsHelper {
  + BcBaserHelper
  - ContentsTable
  - PermissionsTable
  + isAllowPublish()
  + getUrlById()
  + getUrl()
  + isSiteRelated()
  + getPureUrl()
  + getCurrentRelatedSiteUrl()
  + getTree()
  + getParent()
  + getRelatedSiteContents()
  + getRelatedSiteLinks()
  + getContentFolderList()
  + getSiteRoot()
  + getSiteRootId()
  + getContentByEntityId()
  + getContentByUrl()
  - _getContent()
  + isParentId()
  + isFolder()
}

class ContentService {
  + ContentsTable
}

class ContentsTable {
  + initialize()
  + implementedEvents()
  + validationDefault()
  + duplicateRelatedSiteContent()
  + beforeMarshal()
  + afterMarshal()
  + afterValidate()
  + getTrash()
  + hardDel()
  + getUniqueName()
  + beforeSave()
  + afterSave()
  + deleteAssocCache()
  + afterDelete()
  + deleteAlias()
  + deleteRelateSubSiteContent()
  + updateRelateSubSiteContent()
  + copyContentFolderPath()
  + pureUrl()
  + createContent()
  + createUrl()
  + updateSystemData()
  + isPublishById()
  + updateChildren()
  + findByType()
  + deleteByType()
  + getConditionAllowPublish()
  + isPublish()
  + isChangedStatus()
  + getParentTemplate()
  + getRelatedSiteContents()
  + getCacheTime()
  + updateAllUrl()
  + updateChildrenUrl()
  + resetTree()
  + findByUrl()
  + getOrderSameParent()
  + moveOffset()
  + disableUpdatingSystemData()
  + enableUpdatingSystemData()
}

class Content {
  + ID：id
  + コンテンツ名：name
  + プラグイン：plugin
  + コンテンツタイプ：type
  + 実体ID：entity_id
  + URL：url
  + サイトID：site_id
  + エイリアスID：alias_id
  + メインサイトコンテンツID：main_site_content_id
	+ サイトルートに配置されているかどうか：site_root
  + 親ID：parent_id
  + 左位置：lft
  + 右位置：rght
  + 深さ：level
  + タイトル：title
  + 説明文：description
  + アイキャッチ：eyecatch
  + 作成者ID：author_id
  + レイアウトテンプレート：layout_template
  + 公開状態：status
  + 公開開始日：publish_begin
  + 公開終了日：publish_end
  + 自公開状態：self_status
  + 自公開開始日：self_publish_begin
  + 自公開終了日：self_publish_end
  + 作成日：created_date
  + 編集日：modified_date
  + 検索結果より除外するかどうか：exclude_search
  + メニューから除外するかどうか：exclude_menu
  + メニューのリンクを別窓で開くかどうか：blank_link
  + 削除日：deleted_date
  + 削除状態：deleted
  + 作成日（システム）：created
  + 編集日（システム）modified
}

class ContentServiceInterface {
  + get()
  + getTrash()
  + getChildren()
  + getEmptyIndex()
  + getTreeIndex()
  + getIndex()
  + getTableConditions()
  + getTableIndex()
  + getTrashIndex()
  + getContentFolderList()
  + convertTreeList()
  + alias()
  + delete()
  + hardDelete()
  + hardDeleteWithAssoc()
  + deleteAll()
  + hardDeleteAll()
  + restore()
  + restoreAll()
  + getContentsInfo()
  + deleteRecursive()
  + getParentLayoutTemplate()
  + getUrlById()
  + getUrl()
  + update()
  + publish()
  + unpublish()
  + exists()
  + move()
  + isMovable()
  + isPublishById()
  + isAllowPublish()
  + existsContentByUrl()
}

class BcContentsBehavior {
  + initialize()
}

class TreeBehavior {
}

class BcUploadBehavior {
  + initialize()
}

class softDeleteTrait {
}

Admin\ContentsController -left[#Black]-> BcAdminContentsComponent
Admin\ContentsController -right[#Black]-> BcFrontContentsComponent
Admin\ContentsController -down[#Black]-> ContentService

BcContentsHelper -left[#Black]-> ContentService
BcAdminContentHelper -left[#Black]-> ContentService

ContentService -left[dotted,#Black]-|> ContentServiceInterface
ContentService -down[#Black]-> ContentsTable
ContentsTable -left[#Black]-> Content

ContentsTable -down[#Black]-> BcContentsBehavior
ContentsTable -down[#Black]-> TreeBehavior
ContentsTable -down[#Black]-> BcUploadBehavior
ContentsTable -down[#Black]-> softDeleteTrait

@enduml

