| Total Complexity | 56 |
| Total Lines | 816 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
Complex classes like CForumForum often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use CForumForum, and based on these observations, apply Extract Interface, too.
| 1 | <?php |
||
| 23 | class CForumForum extends AbstractResource implements ResourceInterface |
||
| 24 | { |
||
| 25 | /** |
||
| 26 | * @var int |
||
| 27 | * |
||
| 28 | * @ORM\Column(name="iid", type="integer") |
||
| 29 | * @ORM\Id |
||
| 30 | * @ORM\GeneratedValue |
||
| 31 | */ |
||
| 32 | protected $iid; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @var int |
||
| 36 | * |
||
| 37 | * @ORM\Column(name="c_id", type="integer") |
||
| 38 | */ |
||
| 39 | protected $cId; |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @var int |
||
| 43 | * |
||
| 44 | * @ORM\Column(name="forum_id", type="integer") |
||
| 45 | */ |
||
| 46 | protected $forumId; |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @var string |
||
| 50 | * |
||
| 51 | * @ORM\Column(name="forum_title", type="string", length=255, nullable=false) |
||
| 52 | */ |
||
| 53 | protected $forumTitle; |
||
| 54 | |||
| 55 | /** |
||
| 56 | * @var string |
||
| 57 | * |
||
| 58 | * @ORM\Column(name="forum_comment", type="text", nullable=true) |
||
| 59 | */ |
||
| 60 | protected $forumComment; |
||
| 61 | |||
| 62 | /** |
||
| 63 | * @var int |
||
| 64 | * |
||
| 65 | * @ORM\Column(name="forum_threads", type="integer", nullable=true) |
||
| 66 | */ |
||
| 67 | protected $forumThreads; |
||
| 68 | |||
| 69 | /** |
||
| 70 | * @var int |
||
| 71 | * |
||
| 72 | * @ORM\Column(name="forum_posts", type="integer", nullable=true) |
||
| 73 | */ |
||
| 74 | protected $forumPosts; |
||
| 75 | |||
| 76 | /** |
||
| 77 | * @var int |
||
| 78 | * |
||
| 79 | * @ORM\Column(name="forum_last_post", type="integer", nullable=true) |
||
| 80 | */ |
||
| 81 | protected $forumLastPost; |
||
| 82 | |||
| 83 | /** |
||
| 84 | * @var CForumCategory|null |
||
| 85 | * |
||
| 86 | * @ORM\ManyToOne(targetEntity="Chamilo\CourseBundle\Entity\CForumCategory", inversedBy="forums") |
||
| 87 | * @ORM\JoinColumn(name="forum_category", referencedColumnName="iid") |
||
| 88 | */ |
||
| 89 | protected $forumCategory; |
||
| 90 | |||
| 91 | /** |
||
| 92 | * @var int |
||
| 93 | * |
||
| 94 | * @ORM\Column(name="allow_anonymous", type="integer", nullable=true) |
||
| 95 | */ |
||
| 96 | protected $allowAnonymous; |
||
| 97 | |||
| 98 | /** |
||
| 99 | * @var int |
||
| 100 | * |
||
| 101 | * @ORM\Column(name="allow_edit", type="integer", nullable=true) |
||
| 102 | */ |
||
| 103 | protected $allowEdit; |
||
| 104 | |||
| 105 | /** |
||
| 106 | * @var string |
||
| 107 | * |
||
| 108 | * @ORM\Column(name="approval_direct_post", type="string", length=20, nullable=true) |
||
| 109 | */ |
||
| 110 | protected $approvalDirectPost; |
||
| 111 | |||
| 112 | /** |
||
| 113 | * @var int |
||
| 114 | * |
||
| 115 | * @ORM\Column(name="allow_attachments", type="integer", nullable=true) |
||
| 116 | */ |
||
| 117 | protected $allowAttachments; |
||
| 118 | |||
| 119 | /** |
||
| 120 | * @var int |
||
| 121 | * |
||
| 122 | * @ORM\Column(name="allow_new_threads", type="integer", nullable=true) |
||
| 123 | */ |
||
| 124 | protected $allowNewThreads; |
||
| 125 | |||
| 126 | /** |
||
| 127 | * @var string |
||
| 128 | * |
||
| 129 | * @ORM\Column(name="default_view", type="string", length=20, nullable=true) |
||
| 130 | */ |
||
| 131 | protected $defaultView; |
||
| 132 | |||
| 133 | /** |
||
| 134 | * @var string |
||
| 135 | * |
||
| 136 | * @ORM\Column(name="forum_of_group", type="string", length=20, nullable=true) |
||
| 137 | */ |
||
| 138 | protected $forumOfGroup; |
||
| 139 | |||
| 140 | /** |
||
| 141 | * @var string |
||
| 142 | * |
||
| 143 | * @ORM\Column(name="forum_group_public_private", type="string", length=20, nullable=true) |
||
| 144 | */ |
||
| 145 | protected $forumGroupPublicPrivate; |
||
| 146 | |||
| 147 | /** |
||
| 148 | * @var int |
||
| 149 | * |
||
| 150 | * @ORM\Column(name="forum_order", type="integer", nullable=true) |
||
| 151 | */ |
||
| 152 | protected $forumOrder; |
||
| 153 | |||
| 154 | /** |
||
| 155 | * @var int |
||
| 156 | * |
||
| 157 | * @ORM\Column(name="locked", type="integer", nullable=false) |
||
| 158 | */ |
||
| 159 | protected $locked; |
||
| 160 | |||
| 161 | /** |
||
| 162 | * @var int |
||
| 163 | * |
||
| 164 | * @ORM\Column(name="session_id", type="integer", nullable=false) |
||
| 165 | */ |
||
| 166 | protected $sessionId; |
||
| 167 | |||
| 168 | /** |
||
| 169 | * @var string |
||
| 170 | * |
||
| 171 | * @ORM\Column(name="forum_image", type="string", length=255, nullable=false) |
||
| 172 | */ |
||
| 173 | protected $forumImage; |
||
| 174 | |||
| 175 | /** |
||
| 176 | * @var \DateTime |
||
| 177 | * |
||
| 178 | * @ORM\Column(name="start_time", type="datetime", nullable=true) |
||
| 179 | */ |
||
| 180 | protected $startTime; |
||
| 181 | |||
| 182 | /** |
||
| 183 | * @var \DateTime |
||
| 184 | * |
||
| 185 | * @ORM\Column(name="end_time", type="datetime", nullable=true) |
||
| 186 | */ |
||
| 187 | protected $endTime; |
||
| 188 | |||
| 189 | /** |
||
| 190 | * @var int |
||
| 191 | * |
||
| 192 | * @ORM\Column(name="lp_id", type="integer", options={"unsigned":true}) |
||
| 193 | */ |
||
| 194 | protected $lpId; |
||
| 195 | |||
| 196 | /** |
||
| 197 | * @var bool |
||
| 198 | * |
||
| 199 | * @ORM\Column(name="moderated", type="boolean", nullable=true) |
||
| 200 | */ |
||
| 201 | protected $moderated; |
||
| 202 | |||
| 203 | /** |
||
| 204 | * @var CItemProperty |
||
| 205 | */ |
||
| 206 | protected $itemProperty; |
||
| 207 | |||
| 208 | /** |
||
| 209 | * @var ArrayCollection |
||
| 210 | * |
||
| 211 | * @ORM\OneToMany(targetEntity="Chamilo\CourseBundle\Entity\CForumThread", mappedBy="forum") |
||
| 212 | */ |
||
| 213 | protected $threads; |
||
| 214 | |||
| 215 | /** |
||
| 216 | * CForumForum constructor. |
||
| 217 | */ |
||
| 218 | public function __construct() |
||
| 219 | { |
||
| 220 | } |
||
| 221 | |||
| 222 | public function __toString(): string |
||
| 223 | { |
||
| 224 | return $this->getForumTitle(); |
||
| 225 | } |
||
| 226 | |||
| 227 | /** |
||
| 228 | * Set forumTitle. |
||
| 229 | * |
||
| 230 | * @param string $forumTitle |
||
| 231 | * |
||
| 232 | * @return CForumForum |
||
| 233 | */ |
||
| 234 | public function setForumTitle($forumTitle) |
||
| 235 | { |
||
| 236 | $this->forumTitle = $forumTitle; |
||
| 237 | |||
| 238 | return $this; |
||
| 239 | } |
||
| 240 | |||
| 241 | /** |
||
| 242 | * Get forumTitle. |
||
| 243 | * |
||
| 244 | * @return string |
||
| 245 | */ |
||
| 246 | public function getForumTitle() |
||
| 247 | { |
||
| 248 | return $this->forumTitle; |
||
| 249 | } |
||
| 250 | |||
| 251 | /** |
||
| 252 | * Set forumComment. |
||
| 253 | * |
||
| 254 | * @param string $forumComment |
||
| 255 | * |
||
| 256 | * @return CForumForum |
||
| 257 | */ |
||
| 258 | public function setForumComment($forumComment) |
||
| 259 | { |
||
| 260 | $this->forumComment = $forumComment; |
||
| 261 | |||
| 262 | return $this; |
||
| 263 | } |
||
| 264 | |||
| 265 | /** |
||
| 266 | * Get forumComment. |
||
| 267 | * |
||
| 268 | * @return string |
||
| 269 | */ |
||
| 270 | public function getForumComment() |
||
| 271 | { |
||
| 272 | return $this->forumComment; |
||
| 273 | } |
||
| 274 | |||
| 275 | /** |
||
| 276 | * Set forumThreads. |
||
| 277 | * |
||
| 278 | * @param int $forumThreads |
||
| 279 | * |
||
| 280 | * @return CForumForum |
||
| 281 | */ |
||
| 282 | public function setForumThreads($forumThreads) |
||
| 283 | { |
||
| 284 | $this->forumThreads = $forumThreads; |
||
| 285 | |||
| 286 | return $this; |
||
| 287 | } |
||
| 288 | |||
| 289 | /** |
||
| 290 | * Get forumThreads. |
||
| 291 | * |
||
| 292 | * @return int |
||
| 293 | */ |
||
| 294 | public function getForumThreads() |
||
| 295 | { |
||
| 296 | return $this->forumThreads; |
||
| 297 | } |
||
| 298 | |||
| 299 | /** |
||
| 300 | * Set forumPosts. |
||
| 301 | * |
||
| 302 | * @param int $forumPosts |
||
| 303 | * |
||
| 304 | * @return CForumForum |
||
| 305 | */ |
||
| 306 | public function setForumPosts($forumPosts) |
||
| 307 | { |
||
| 308 | $this->forumPosts = $forumPosts; |
||
| 309 | |||
| 310 | return $this; |
||
| 311 | } |
||
| 312 | |||
| 313 | /** |
||
| 314 | * Get forumPosts. |
||
| 315 | * |
||
| 316 | * @return int |
||
| 317 | */ |
||
| 318 | public function getForumPosts() |
||
| 319 | { |
||
| 320 | return $this->forumPosts; |
||
| 321 | } |
||
| 322 | |||
| 323 | /** |
||
| 324 | * Set forumLastPost. |
||
| 325 | * |
||
| 326 | * @param int $forumLastPost |
||
| 327 | * |
||
| 328 | * @return CForumForum |
||
| 329 | */ |
||
| 330 | public function setForumLastPost($forumLastPost) |
||
| 331 | { |
||
| 332 | $this->forumLastPost = $forumLastPost; |
||
| 333 | |||
| 334 | return $this; |
||
| 335 | } |
||
| 336 | |||
| 337 | /** |
||
| 338 | * Get forumLastPost. |
||
| 339 | * |
||
| 340 | * @return int |
||
| 341 | */ |
||
| 342 | public function getForumLastPost() |
||
| 343 | { |
||
| 344 | return $this->forumLastPost; |
||
| 345 | } |
||
| 346 | |||
| 347 | /** |
||
| 348 | * Set forumCategory. |
||
| 349 | * |
||
| 350 | * @return CForumForum |
||
| 351 | */ |
||
| 352 | public function setForumCategory(CForumCategory $forumCategory = null) |
||
| 353 | { |
||
| 354 | $this->forumCategory = $forumCategory; |
||
| 355 | |||
| 356 | return $this; |
||
| 357 | } |
||
| 358 | |||
| 359 | /** |
||
| 360 | * Get forumCategory. |
||
| 361 | * |
||
| 362 | * @return CForumCategory|null |
||
| 363 | */ |
||
| 364 | public function getForumCategory() |
||
| 365 | { |
||
| 366 | return $this->forumCategory; |
||
| 367 | } |
||
| 368 | |||
| 369 | /** |
||
| 370 | * Set allowAnonymous. |
||
| 371 | * |
||
| 372 | * @param int $allowAnonymous |
||
| 373 | * |
||
| 374 | * @return CForumForum |
||
| 375 | */ |
||
| 376 | public function setAllowAnonymous($allowAnonymous) |
||
| 377 | { |
||
| 378 | $this->allowAnonymous = $allowAnonymous; |
||
| 379 | |||
| 380 | return $this; |
||
| 381 | } |
||
| 382 | |||
| 383 | /** |
||
| 384 | * Get allowAnonymous. |
||
| 385 | * |
||
| 386 | * @return int |
||
| 387 | */ |
||
| 388 | public function getAllowAnonymous() |
||
| 389 | { |
||
| 390 | return $this->allowAnonymous; |
||
| 391 | } |
||
| 392 | |||
| 393 | /** |
||
| 394 | * Set allowEdit. |
||
| 395 | * |
||
| 396 | * @param int $allowEdit |
||
| 397 | * |
||
| 398 | * @return CForumForum |
||
| 399 | */ |
||
| 400 | public function setAllowEdit($allowEdit) |
||
| 401 | { |
||
| 402 | $this->allowEdit = $allowEdit; |
||
| 403 | |||
| 404 | return $this; |
||
| 405 | } |
||
| 406 | |||
| 407 | /** |
||
| 408 | * Get allowEdit. |
||
| 409 | * |
||
| 410 | * @return int |
||
| 411 | */ |
||
| 412 | public function getAllowEdit() |
||
| 413 | { |
||
| 414 | return $this->allowEdit; |
||
| 415 | } |
||
| 416 | |||
| 417 | /** |
||
| 418 | * Set approvalDirectPost. |
||
| 419 | * |
||
| 420 | * @param string $approvalDirectPost |
||
| 421 | * |
||
| 422 | * @return CForumForum |
||
| 423 | */ |
||
| 424 | public function setApprovalDirectPost($approvalDirectPost) |
||
| 425 | { |
||
| 426 | $this->approvalDirectPost = $approvalDirectPost; |
||
| 427 | |||
| 428 | return $this; |
||
| 429 | } |
||
| 430 | |||
| 431 | /** |
||
| 432 | * Get approvalDirectPost. |
||
| 433 | * |
||
| 434 | * @return string |
||
| 435 | */ |
||
| 436 | public function getApprovalDirectPost() |
||
| 437 | { |
||
| 438 | return $this->approvalDirectPost; |
||
| 439 | } |
||
| 440 | |||
| 441 | /** |
||
| 442 | * Set allowAttachments. |
||
| 443 | * |
||
| 444 | * @param int $allowAttachments |
||
| 445 | * |
||
| 446 | * @return CForumForum |
||
| 447 | */ |
||
| 448 | public function setAllowAttachments($allowAttachments) |
||
| 449 | { |
||
| 450 | $this->allowAttachments = $allowAttachments; |
||
| 451 | |||
| 452 | return $this; |
||
| 453 | } |
||
| 454 | |||
| 455 | /** |
||
| 456 | * Get allowAttachments. |
||
| 457 | * |
||
| 458 | * @return int |
||
| 459 | */ |
||
| 460 | public function getAllowAttachments() |
||
| 463 | } |
||
| 464 | |||
| 465 | /** |
||
| 466 | * Set allowNewThreads. |
||
| 467 | * |
||
| 468 | * @param int $allowNewThreads |
||
| 469 | * |
||
| 470 | * @return CForumForum |
||
| 471 | */ |
||
| 472 | public function setAllowNewThreads($allowNewThreads) |
||
| 473 | { |
||
| 474 | $this->allowNewThreads = $allowNewThreads; |
||
| 475 | |||
| 476 | return $this; |
||
| 477 | } |
||
| 478 | |||
| 479 | /** |
||
| 480 | * Get allowNewThreads. |
||
| 481 | * |
||
| 482 | * @return int |
||
| 483 | */ |
||
| 484 | public function getAllowNewThreads() |
||
| 485 | { |
||
| 486 | return $this->allowNewThreads; |
||
| 487 | } |
||
| 488 | |||
| 489 | /** |
||
| 490 | * Set defaultView. |
||
| 491 | * |
||
| 492 | * @param string $defaultView |
||
| 493 | * |
||
| 494 | * @return CForumForum |
||
| 495 | */ |
||
| 496 | public function setDefaultView($defaultView) |
||
| 497 | { |
||
| 498 | $this->defaultView = $defaultView; |
||
| 499 | |||
| 500 | return $this; |
||
| 501 | } |
||
| 502 | |||
| 503 | /** |
||
| 504 | * Get defaultView. |
||
| 505 | * |
||
| 506 | * @return string |
||
| 507 | */ |
||
| 508 | public function getDefaultView() |
||
| 509 | { |
||
| 510 | return $this->defaultView; |
||
| 511 | } |
||
| 512 | |||
| 513 | /** |
||
| 514 | * Set forumOfGroup. |
||
| 515 | * |
||
| 516 | * @param string $forumOfGroup |
||
| 517 | * |
||
| 518 | * @return CForumForum |
||
| 519 | */ |
||
| 520 | public function setForumOfGroup($forumOfGroup) |
||
| 521 | { |
||
| 522 | $this->forumOfGroup = $forumOfGroup; |
||
| 523 | |||
| 524 | return $this; |
||
| 525 | } |
||
| 526 | |||
| 527 | /** |
||
| 528 | * Get forumOfGroup. |
||
| 529 | * |
||
| 530 | * @return string |
||
| 531 | */ |
||
| 532 | public function getForumOfGroup() |
||
| 533 | { |
||
| 534 | return $this->forumOfGroup; |
||
| 535 | } |
||
| 536 | |||
| 537 | public function getForumGroupPublicPrivate(): string |
||
| 538 | { |
||
| 539 | return $this->forumGroupPublicPrivate; |
||
| 540 | } |
||
| 541 | |||
| 542 | /** |
||
| 543 | * @return $this |
||
| 544 | */ |
||
| 545 | public function setForumGroupPublicPrivate(string $forumGroupPublicPrivate) |
||
| 546 | { |
||
| 547 | $this->forumGroupPublicPrivate = $forumGroupPublicPrivate; |
||
| 548 | |||
| 549 | return $this; |
||
| 550 | } |
||
| 551 | |||
| 552 | /** |
||
| 553 | * Set forumOrder. |
||
| 554 | * |
||
| 555 | * @param int $forumOrder |
||
| 556 | * |
||
| 557 | * @return CForumForum |
||
| 558 | */ |
||
| 559 | public function setForumOrder($forumOrder) |
||
| 560 | { |
||
| 561 | $this->forumOrder = $forumOrder; |
||
| 562 | |||
| 563 | return $this; |
||
| 564 | } |
||
| 565 | |||
| 566 | /** |
||
| 567 | * Get forumOrder. |
||
| 568 | * |
||
| 569 | * @return int |
||
| 570 | */ |
||
| 571 | public function getForumOrder() |
||
| 572 | { |
||
| 573 | return $this->forumOrder; |
||
| 574 | } |
||
| 575 | |||
| 576 | /** |
||
| 577 | * Set locked. |
||
| 578 | * |
||
| 579 | * @param int $locked |
||
| 580 | * |
||
| 581 | * @return CForumForum |
||
| 582 | */ |
||
| 583 | public function setLocked($locked) |
||
| 584 | { |
||
| 585 | $this->locked = $locked; |
||
| 586 | |||
| 587 | return $this; |
||
| 588 | } |
||
| 589 | |||
| 590 | /** |
||
| 591 | * Get locked. |
||
| 592 | * |
||
| 593 | * @return int |
||
| 594 | */ |
||
| 595 | public function getLocked() |
||
| 596 | { |
||
| 597 | return $this->locked; |
||
| 598 | } |
||
| 599 | |||
| 600 | /** |
||
| 601 | * Set sessionId. |
||
| 602 | * |
||
| 603 | * @param int $sessionId |
||
| 604 | * |
||
| 605 | * @return CForumForum |
||
| 606 | */ |
||
| 607 | public function setSessionId($sessionId) |
||
| 608 | { |
||
| 609 | $this->sessionId = $sessionId; |
||
| 610 | |||
| 611 | return $this; |
||
| 612 | } |
||
| 613 | |||
| 614 | /** |
||
| 615 | * Get sessionId. |
||
| 616 | * |
||
| 617 | * @return int |
||
| 618 | */ |
||
| 619 | public function getSessionId() |
||
| 620 | { |
||
| 621 | return $this->sessionId; |
||
| 622 | } |
||
| 623 | |||
| 624 | /** |
||
| 625 | * Set forumImage. |
||
| 626 | * |
||
| 627 | * @param string $forumImage |
||
| 628 | * |
||
| 629 | * @return CForumForum |
||
| 630 | */ |
||
| 631 | public function setForumImage($forumImage) |
||
| 632 | { |
||
| 633 | $this->forumImage = $forumImage; |
||
| 634 | |||
| 635 | return $this; |
||
| 636 | } |
||
| 637 | |||
| 638 | /** |
||
| 639 | * Get forumImage. |
||
| 640 | * |
||
| 641 | * @return string |
||
| 642 | */ |
||
| 643 | public function getForumImage() |
||
| 644 | { |
||
| 645 | return $this->forumImage; |
||
| 646 | } |
||
| 647 | |||
| 648 | /** |
||
| 649 | * Set startTime. |
||
| 650 | * |
||
| 651 | * @param \DateTime $startTime |
||
| 652 | * |
||
| 653 | * @return CForumForum |
||
| 654 | */ |
||
| 655 | public function setStartTime($startTime) |
||
| 656 | { |
||
| 657 | $this->startTime = $startTime; |
||
| 658 | |||
| 659 | return $this; |
||
| 660 | } |
||
| 661 | |||
| 662 | /** |
||
| 663 | * Get startTime. |
||
| 664 | * |
||
| 665 | * @return \DateTime |
||
| 666 | */ |
||
| 667 | public function getStartTime() |
||
| 668 | { |
||
| 669 | return $this->startTime; |
||
| 670 | } |
||
| 671 | |||
| 672 | /** |
||
| 673 | * Set endTime. |
||
| 674 | * |
||
| 675 | * @param \DateTime $endTime |
||
| 676 | * |
||
| 677 | * @return CForumForum |
||
| 678 | */ |
||
| 679 | public function setEndTime($endTime) |
||
| 680 | { |
||
| 681 | $this->endTime = $endTime; |
||
| 682 | |||
| 683 | return $this; |
||
| 684 | } |
||
| 685 | |||
| 686 | /** |
||
| 687 | * Get endTime. |
||
| 688 | * |
||
| 689 | * @return \DateTime |
||
| 690 | */ |
||
| 691 | public function getEndTime() |
||
| 692 | { |
||
| 693 | return $this->endTime; |
||
| 694 | } |
||
| 695 | |||
| 696 | /** |
||
| 697 | * Set forumId. |
||
| 698 | * |
||
| 699 | * @param int $forumId |
||
| 700 | * |
||
| 701 | * @return CForumForum |
||
| 702 | */ |
||
| 703 | public function setForumId($forumId) |
||
| 704 | { |
||
| 705 | $this->forumId = $forumId; |
||
| 706 | |||
| 707 | return $this; |
||
| 708 | } |
||
| 709 | |||
| 710 | /** |
||
| 711 | * Get forumId. |
||
| 712 | * |
||
| 713 | * @return int |
||
| 714 | */ |
||
| 715 | public function getForumId() |
||
| 716 | { |
||
| 717 | return $this->forumId; |
||
| 718 | } |
||
| 719 | |||
| 720 | /** |
||
| 721 | * Set cId. |
||
| 722 | * |
||
| 723 | * @param int $cId |
||
| 724 | * |
||
| 725 | * @return CForumForum |
||
| 726 | */ |
||
| 727 | public function setCId($cId) |
||
| 728 | { |
||
| 729 | $this->cId = $cId; |
||
| 730 | |||
| 731 | return $this; |
||
| 732 | } |
||
| 733 | |||
| 734 | /** |
||
| 735 | * Get cId. |
||
| 736 | * |
||
| 737 | * @return int |
||
| 738 | */ |
||
| 739 | public function getCId() |
||
| 740 | { |
||
| 741 | return $this->cId; |
||
| 742 | } |
||
| 743 | |||
| 744 | /** |
||
| 745 | * Set lpId. |
||
| 746 | * |
||
| 747 | * @param int $lpId |
||
| 748 | * |
||
| 749 | * @return CForumForum |
||
| 750 | */ |
||
| 751 | public function setLpId($lpId) |
||
| 752 | { |
||
| 753 | $this->lpId = $lpId; |
||
| 754 | |||
| 755 | return $this; |
||
| 756 | } |
||
| 757 | |||
| 758 | /** |
||
| 759 | * Get lpId. |
||
| 760 | * |
||
| 761 | * @return int |
||
| 762 | */ |
||
| 763 | public function getLpId() |
||
| 764 | { |
||
| 765 | return $this->lpId; |
||
| 766 | } |
||
| 767 | |||
| 768 | /** |
||
| 769 | * @return bool |
||
| 770 | */ |
||
| 771 | public function isModerated() |
||
| 772 | { |
||
| 773 | return $this->moderated; |
||
| 774 | } |
||
| 775 | |||
| 776 | /** |
||
| 777 | * @param $moderated |
||
| 778 | * |
||
| 779 | * @return $this |
||
| 780 | */ |
||
| 781 | public function setModerated($moderated) |
||
| 782 | { |
||
| 783 | $this->moderated = $moderated; |
||
| 784 | |||
| 785 | return $this; |
||
| 786 | } |
||
| 787 | |||
| 788 | /** |
||
| 789 | * Get iid. |
||
| 790 | * |
||
| 791 | * @return int |
||
| 792 | */ |
||
| 793 | public function getIid() |
||
| 794 | { |
||
| 795 | return $this->iid; |
||
| 796 | } |
||
| 797 | |||
| 798 | /** |
||
| 799 | * Get threads. |
||
| 800 | * |
||
| 801 | * @return ArrayCollection|CForumThread[] |
||
| 802 | */ |
||
| 803 | public function getThreads() |
||
| 804 | { |
||
| 805 | return $this->threads; |
||
| 806 | } |
||
| 807 | |||
| 808 | /** |
||
| 809 | * Set itemProperty. |
||
| 810 | * |
||
| 811 | * @return CForumForum |
||
| 812 | */ |
||
| 813 | public function setItemProperty(CItemProperty $itemProperty) |
||
| 814 | { |
||
| 815 | $this->itemProperty = $itemProperty; |
||
| 816 | |||
| 817 | return $this; |
||
| 818 | } |
||
| 819 | |||
| 820 | /** |
||
| 821 | * @return CItemProperty |
||
| 822 | */ |
||
| 823 | public function getItemProperty() |
||
| 824 | { |
||
| 825 | return $this->itemProperty; |
||
| 826 | } |
||
| 827 | |||
| 828 | /** |
||
| 829 | * Resource identifier. |
||
| 830 | */ |
||
| 831 | public function getResourceIdentifier(): int |
||
| 832 | { |
||
| 833 | return $this->getIid(); |
||
| 834 | } |
||
| 835 | |||
| 836 | public function getResourceName(): string |
||
| 839 | } |
||
| 840 | } |
||
| 841 |