1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
entity.php
См. документацию.
1<?php
2
3namespace Bitrix\Forum\Internals;
4
5use Bitrix\Forum\ForumTable;
6use Bitrix\Forum\Forum;
7use Bitrix\Forum\Permission;
8use Bitrix\Main\Config\Option;
9use Bitrix\Main\Event;
10use Bitrix\Main\SystemException;
11
12abstract class Entity implements \ArrayAccess
13{
14 use \Bitrix\Forum\Internals\EntityBaseMethods;
15
17 protected $authorId;
19 protected $forum;
21 protected $data;
22
23 public function __construct($id)
24 {
25 $this->id = $id;
26 if ($id <= 0)
27 {
28 throw new \Bitrix\Main\ArgumentNullException(static::class . " empty id.");
29 }
30 $this->init();
31
32 $this->forum = new Forum($this->data["FORUM_ID"]);
33
34 if ($this->authorId === null)
35 {
36 throw new \Bitrix\Main\ArgumentNullException("Author id must be defined.");
37 }
38
39 $this->errorCollection = new \Bitrix\Main\ErrorCollection();
40 }
41
45 abstract protected function init();
46
47 public function getId()
48 {
49 return $this->id;
50 }
51
52 public function getForumId()
53 {
54 return $this->forum->getId();
55 }
56
57 public function getAuthorId()
58 {
59 return $this->authorId;
60 }
61 // entity actions
62 abstract public function edit(array $fields);
63 abstract public function remove();
64 abstract public static function create($parentObject, array $fields);
65
66 // crud actions
67 //abstract public static function add($parentObject, array $fields);
68 abstract public static function update(int $id, array &$fields);
69 abstract public static function delete(int $id);
70}
__construct($id)
Определения entity.php:23
getAuthorId()
Определения entity.php:57
static create($parentObject, array $fields)
static update(int $id, array &$fields)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
Определения ufield.php:9
$fields
Определения yandex_run.php:501