У нас вы можете посмотреть бесплатно Creating a custom entity - Building with XenForo 2 part 5 или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
Welcome to a new series of videos taking an in-depth look at building an add-on for XenForo 2. These videos will take you step-by-step through various tools and technologies available for you to use. Part 5: In this video, we cover how to create a custom entity to describe your own content. We set up relations with linked database tables, set up data validation and manipulation, and finish off with some testing. Topics covered: 00:00 Introduction 00:08 Create an entity class 01:06 Essentials for Entity::getStructure() 01:47 $structure→table 02:00 $structure→shortName 02:12 $structure→primaryKey 02:24 Additional (database) fields 02:40 Default field values 05:41 $structure→relations 06:07 $structure→relations[...]['entity'] 06:09 $structure→relations[...]['type'] self::TO_ONE 06:17 $structure→relations[...]['conditions'] 06:23 $structure→relations[...]['primary'] 06:33 $structure→defaultWith 07:13 Using _preSave() to auto-update fields 08:08 $this→isUpdate() 08:56 Minor oops 09:20 Adding PhpDoc with xf-dev:entity-class-properties 10:50 Auto-censoring fields 11:39 Automatic validation/verification of submitted data 12:09 verifyTitle() 13:40 Automatic data manipulation with verify functions 14:35 $structure→getters 15:28 Example getter getFirstWord() 17:16 Updating PhpDoc with $structure→getters 17:55 Generating database schema from your entity 18:51 Creating a database table with Setup.php 19:29 Manually running steps from Setup.php 20:18 Creating test data 20:30 Using Controller→em()→create() 20:51 Setting field values 21:02 Making use of PhpDoc 21:45 Entity→save() 21:58 Verifying successful operation Building a XenForo 2 add-on playlist: • Building with XenForo 2 Useful links: XenForo.com https://XenForo.com XenForo developer documentation https://XenForo.com/docs/dev Development environment setup guides MacOS - https://xenforo.com/docs/dev/macos-dev/ Windows - https://xenforo.com/docs/dev/windows-... Linux - https://xenforo.com/docs/dev/linux-dev/ XDebug with Visual Studio Code - https://xenforo.com/docs/dev/vscode/ The XenForo 1.0 video series from 2010 Part 1 - https://vimeo.com/16893821 Part 2 - https://vimeo.com/17010931 Part 3 - https://vimeo.com/17086181