Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| Article | n/a |
0 / 0 |
n/a |
0 / 0 |
0 | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | declare(strict_types=1); |
| 3 | |
| 4 | namespace App\Model\Entity; |
| 5 | |
| 6 | use Cake\ORM\Behavior\Translate\TranslateTrait; |
| 7 | use Cake\ORM\Entity; |
| 8 | |
| 9 | /** |
| 10 | * Article Entity |
| 11 | * |
| 12 | * @property string $id |
| 13 | * @property string $user_id |
| 14 | * @property string $title |
| 15 | * @property string|null $lede |
| 16 | * @property bool|null $featured |
| 17 | * @property bool|null $main_menu |
| 18 | * @property string|null $body |
| 19 | * @property string|null $markdown |
| 20 | * @property string|null $summary |
| 21 | * @property \Cake\I18n\DateTime|null $created |
| 22 | * @property \Cake\I18n\DateTime|null $modified |
| 23 | * @property string|null $slug |
| 24 | * @property string|null $meta_title |
| 25 | * @property string|null $meta_description |
| 26 | * @property string|null $meta_keywords |
| 27 | * @property string|null $facebook_description |
| 28 | * @property string|null $linkedin_description |
| 29 | * @property string|null $twitter_description |
| 30 | * @property string|null $instagram_description |
| 31 | * @property int|null $word_count |
| 32 | * @property string $kind |
| 33 | * @property string|null $parent_id |
| 34 | * @property int|null $lft |
| 35 | * @property int|null $rght |
| 36 | * @property \Cake\I18n\DateTime|null $published |
| 37 | * @property bool $is_published |
| 38 | * @property string|null $image |
| 39 | * @property string|null $dir |
| 40 | * @property string|null $alt_text |
| 41 | * @property int|null $view_count |
| 42 | * @property array|null $imageUploads |
| 43 | * @property array|null $unlinkedImages |
| 44 | * |
| 45 | * @property \App\Model\Entity\User $user |
| 46 | * @property \App\Model\Entity\Tag[] $tags |
| 47 | * @property \App\Model\Entity\Image[] $images |
| 48 | * @property \App\Model\Entity\Comment[] $comments |
| 49 | * @property \App\Model\Entity\Slug[] $slugs |
| 50 | * @property \App\Model\Entity\PageView[] $page_views |
| 51 | * @property \App\Model\Entity\Article|null $parent_article |
| 52 | * @property \App\Model\Entity\Article[] $child_articles |
| 53 | */ |
| 54 | class Article extends Entity |
| 55 | { |
| 56 | use SeoEntityTrait; |
| 57 | use TranslateTrait; |
| 58 | use ImageUrlTrait; |
| 59 | |
| 60 | /** |
| 61 | * Fields that can be mass assigned using newEntity() or patchEntity(). |
| 62 | * |
| 63 | * Note that when '*' is set to true, this allows all unspecified fields to |
| 64 | * be mass assigned. For security purposes, it is advised to set '*' to false |
| 65 | * (or remove it), and explicitly make individual fields accessible as needed. |
| 66 | * |
| 67 | * @var array<string, bool> |
| 68 | */ |
| 69 | protected array $_accessible = [ |
| 70 | 'user_id' => true, |
| 71 | 'title' => true, |
| 72 | 'lede' => true, |
| 73 | 'featured' => true, |
| 74 | 'main_menu' => true, |
| 75 | 'slug' => true, |
| 76 | 'body' => true, |
| 77 | 'markdown' => true, |
| 78 | 'summary' => true, |
| 79 | 'created' => true, |
| 80 | 'modified' => true, |
| 81 | 'word_count' => true, |
| 82 | 'kind' => true, |
| 83 | 'parent_id' => true, |
| 84 | 'lft' => true, |
| 85 | 'rght' => true, |
| 86 | 'published' => true, |
| 87 | 'is_published' => true, |
| 88 | 'tags' => true, |
| 89 | 'images' => true, |
| 90 | 'image' => true, |
| 91 | // SEO fields (managed by SeoEntityTrait) |
| 92 | 'meta_title' => true, |
| 93 | 'meta_description' => true, |
| 94 | 'meta_keywords' => true, |
| 95 | 'facebook_description' => true, |
| 96 | 'linkedin_description' => true, |
| 97 | 'twitter_description' => true, |
| 98 | 'instagram_description' => true, |
| 99 | ]; |
| 100 | } |