コード例 #1
0
 /**
  * ContentRatingChange constructor. Pass inside record, type and user object
  * @param Content $record
  * @param string $type
  * @param iUser $user
  */
 public function __construct($record, $type, $user)
 {
     $this->_content = $record;
     $this->_type = $type;
     $this->_user = $user;
     parent::__construct();
 }
コード例 #2
0
ファイル: EntityCategoryList.php プロジェクト: phpffcms/ffcms
 /**
  * EntityCategoryList constructor. Pass pathway as string and data of multi-category system
  * @param string $path
  * @param array $configs
  * @param int $offset
  * @param string $sort
  */
 public function __construct($path, array $configs, $offset = 0, $sort = 'newest')
 {
     $this->_path = $path;
     $this->_configs = $configs;
     $this->_page = (int) $offset;
     $this->_sort = $sort;
     parent::__construct();
 }
コード例 #3
0
ファイル: EntityDeleteRoute.php プロジェクト: phpffcms/ffcms
 /**
  * EntityDeleteRoute constructor. Pass parameters from controller
  * @param string|null $type
  * @param string|null $loader
  * @param string|null $source
  */
 public function __construct($type = null, $loader = null, $source = null)
 {
     $this->type = $type;
     $this->loader = $loader;
     $this->source = $source;
     $this->_cfg = App::$Properties->getAll('Routing');
     parent::__construct(true);
 }
コード例 #4
0
ファイル: SearchContent.php プロジェクト: phpffcms/ffcms
 /**
  * SearchContainer constructor. Pass string query inside
  * @param string $query
  * @param int $limit
  */
 public function __construct($query, $limit = 10)
 {
     $this->query = $query;
     $this->limit = (int) $limit;
     if ($this->limit < 1) {
         $this->limit = 1;
     }
     parent::__construct();
 }
コード例 #5
0
ファイル: FormInstall.php プロジェクト: phpffcms/ffcms
 /**
  * FormInstall constructor. Pass applications object from controller
  * @param $apps
  * @param string $type
  * @throws SyntaxException
  */
 public function __construct(array $apps = null, $type)
 {
     $this->_apps = $apps;
     // check if passed type is allowed to use
     if (!Arr::in($type, ['app', 'widget'])) {
         throw new SyntaxException('The type of extension is not defined!');
     }
     $this->_type = $type;
     parent::__construct();
 }
コード例 #6
0
 /**
  * EntityContentSearch constructor. Pass search terms (query string) to model and used items to skip it by id.
  * @param $terms
  * @param int|array $skipIds
  */
 public function __construct($terms, $skipIds = 0)
 {
     $this->_terms = App::$Security->strip_tags(trim($terms, ' '));
     if (Obj::isLikeInt($skipIds)) {
         $this->_skip = [$skipIds];
     } elseif (Obj::isArray($skipIds)) {
         $this->_skip = $skipIds;
     }
     parent::__construct();
 }
コード例 #7
0
ファイル: EntityCommentData.php プロジェクト: phpffcms/ffcms
 /**
  * EntityCommentPostData constructor. Pass inside the model active record object of comment post or answer
  * @param $record
  * @throws JsonException
  */
 public function __construct($record, $calcAnswers = true)
 {
     $this->_record = $record;
     $this->_calcAnswers = (bool) $calcAnswers;
     if ($this->_record instanceof CommentPost) {
         $this->_type = 'post';
     } elseif ($this->_record instanceof CommentAnswer) {
         $this->_type = 'answer';
     } else {
         throw new JsonException('Unknown comment request');
     }
     parent::__construct();
 }
コード例 #8
0
ファイル: EntityBuildMap.php プロジェクト: phpffcms/ffcms
 /**
  * EntityBuildMap constructor. Pass available languages and data as array inside.
  * @param array|null $langs
  * @param array|null $data
  */
 public function __construct(array $langs = null, array $data = null)
 {
     $this->langs = $langs;
     if ($data !== null && count($data) > 0) {
         foreach ($data as $item) {
             if (!Obj::isArray($item) || !isset($item['uri'], $item['lastmod'])) {
                 continue;
             }
             $this->add($item['uri'], $item['lastmod'], $item['freq'], $item['priority']);
         }
     }
     parent::__construct();
 }
コード例 #9
0
ファイル: EntitySearchMain.php プロジェクト: phpffcms/ffcms
 /**
  * EntitySearchMain constructor. Pass query inside
  * @param string $query
  * @param array|null $configs
  */
 public function __construct($query, array $configs = null)
 {
     $this->query = $query;
     $this->_configs = $configs;
     parent::__construct();
 }
コード例 #10
0
ファイル: FormContentUpdate.php プロジェクト: phpffcms/ffcms
 /**
  * FormContentUpdate constructor. Pass content active record inside
  * @param Content $content
  */
 public function __construct(Content $content)
 {
     $this->_content = $content;
     parent::__construct();
 }
コード例 #11
0
 /**
  * EntityAddNotification constructor. Pass target user_id inside the model
  * @param bool $targetId
  */
 public function __construct($targetId)
 {
     $this->_targetId = $targetId;
     parent::__construct();
 }
コード例 #12
0
ファイル: EntityContentRead.php プロジェクト: phpffcms/ffcms
 /**
  * EntityContentRead constructor. Pass active record objects
  * @param ContentCategory $category
  * @param Content $content
  */
 public function __construct(ContentCategory $category, Content $content)
 {
     $this->_category = $category;
     $this->_content = $content;
     parent::__construct();
 }
コード例 #13
0
ファイル: FormContentRestore.php プロジェクト: phpffcms/ffcms
 /**
  * FormContentRestore constructor. Pass active record object inside
  * @param Content $record
  */
 public function __construct(Content $record)
 {
     $this->_record = $record;
     parent::__construct();
 }
コード例 #14
0
ファイル: FormIgnoreDelete.php プロジェクト: phpffcms/ffcms
 /**
  * FormIgnoreDelete constructor. Pass current user object and target user id inside
  * @param iUser $user
  * @param int $target_id
  */
 public function __construct(iUser $user, $target_id)
 {
     $this->_user = $user;
     $this->_target_id = $target_id;
     parent::__construct(true);
 }
コード例 #15
0
ファイル: FormCommentDelete.php プロジェクト: phpffcms/ffcms
 /**
  * FormCommentDelete constructor. Pass active record and type of comment system inside.
  * @param object $record
  * @param string $type
  */
 public function __construct($record, $type)
 {
     $this->_record = $record;
     $this->_type = $type;
     parent::__construct();
 }
コード例 #16
0
 /**
  * FormContentGlobDelete constructor. Pass records inside.
  * @param Content[]|Collection $records
  */
 public function __construct($records)
 {
     $this->_records = $records;
     parent::__construct();
 }
コード例 #17
0
ファイル: FormUserDelete.php プロジェクト: phpffcms/ffcms
 /**
  * FormUserDelete constructor. Pass user ids inside
  * @param array $ids
  */
 public function __construct(array $ids)
 {
     $this->_ids = $ids;
     parent::__construct(true);
 }
コード例 #18
0
ファイル: FormCategoryUpdate.php プロジェクト: phpffcms/ffcms
 /**
  * FormCategoryUpdate constructor. Pass record object inside model
  * @param ContentCategory $record
  * @param int|null $dependId
  */
 public function __construct(ContentCategory $record, $dependId = null)
 {
     $this->_record = $record;
     $this->_tmpDependId = $dependId;
     parent::__construct();
 }
コード例 #19
0
ファイル: FormUpdateDownload.php プロジェクト: phpffcms/ffcms
 /**
  * FormUpdateDownload constructor. Pass download url & tag name inside
  * @param bool $url
  * @param $name
  */
 public function __construct($url, $name)
 {
     $this->url = $url;
     $this->name = $name;
     parent::__construct();
 }
コード例 #20
0
ファイル: EntityIndexList.php プロジェクト: phpffcms/ffcms
 /**
  * EntityIndexList constructor. Pass current language from controller request
  * @param string|null $currentLang
  */
 public function __construct($currentLang = null)
 {
     $this->_lang = $currentLang;
     parent::__construct();
 }
コード例 #21
0
ファイル: FormUpdateDatabase.php プロジェクト: phpffcms/ffcms
 /**
  * FormUpdateDatabase constructor. Pass db and script version inside
  * @param string $db
  * @param string $script
  */
 public function __construct($db, $script)
 {
     $this->dbVersion = $db;
     $this->scriptVersion = $script;
     parent::__construct(true);
 }
コード例 #22
0
ファイル: FormCommentUpdate.php プロジェクト: phpffcms/ffcms
 /**
  * FormCommentUpdate constructor. Pass record inside the model.
  * @param \Apps\ActiveRecord\CommentPost|\Apps\ActiveRecord\CommentAnswer $record
  */
 public function __construct($record, $type = 'comment')
 {
     $this->_record = $record;
     parent::__construct();
 }
コード例 #23
0
 /**
  * FormNarrowContentUpdate constructor. Pass record object inside.
  * @param Content $record
  * @param array $configs
  */
 public function __construct(Content $record, $configs)
 {
     $this->_record = $record;
     $this->_configs = $configs;
     parent::__construct();
 }
コード例 #24
0
ファイル: FormFieldUpdate.php プロジェクト: phpffcms/ffcms
 /**
  * FormFieldUpdate constructor. Pass profile field record inside
  * @param ProfileField $record
  */
 public function __construct(ProfileField $record)
 {
     $this->_record = $record;
     parent::__construct();
 }
コード例 #25
0
ファイル: FormRegister.php プロジェクト: phpffcms/ffcms
 /**
  * FormRegister constructor. Build model and set maker if captcha is enabled
  * @param bool $captcha
  */
 public function __construct($captcha = false)
 {
     $this->_captcha = $captcha;
     parent::__construct(true);
 }
コード例 #26
0
ファイル: FormFeedbackAdd.php プロジェクト: phpffcms/ffcms
 /**
  * FormFeedbackAdd constructor. Pass captcha marker enabled inside
  * @param bool $captcha
  */
 public function __construct($captcha = true)
 {
     $this->_useCaptcha = (bool) $captcha;
     parent::__construct();
 }
コード例 #27
0
ファイル: FormPasswordChange.php プロジェクト: phpffcms/ffcms
 /**
  * Constructor with user object relation
  * @param iUser $user
  */
 public function __construct(iUser $user)
 {
     $this->_user = $user;
     parent::__construct(true);
 }
コード例 #28
0
ファイル: FormLogin.php プロジェクト: phpffcms/ffcms
 /**
  * Construct FormLogin. Pass is captcha used inside
  * @param bool $captcha
  */
 public function __construct($captcha = false)
 {
     $this->_captcha = $captcha;
     // tell that we shall use csrf protection
     parent::__construct(true);
 }
コード例 #29
0
ファイル: FormSettings.php プロジェクト: phpffcms/ffcms
 /**
  * FormSettings constructor. Pass configuration inside as factory.
  * @param array $configs
  */
 public function __construct(array $configs = null)
 {
     $this->_configs = $configs;
     parent::__construct();
 }
コード例 #30
0
ファイル: FormAnswerAdd.php プロジェクト: phpffcms/ffcms
 /**
  * FormAnswerAdd constructor. Pass active record of comment post and user id
  * @param $recordPost
  * @param int $userId
  */
 public function __construct($recordPost, $userId = 0)
 {
     $this->_post = $recordPost;
     $this->_userId = (int) $userId;
     parent::__construct();
 }