Beispiel #1
0
 protected function init($config = array())
 {
     $this->website = $this->website ?: App::get()->title;
     return parent::init($config = array());
 }
Beispiel #2
0
 public function init($config)
 {
     $this->options = ['script_url' => $this->uploader->dataUrl, 'upload_dir' => $this->uploader->uploadDir ?: dirname($_SERVER['SCRIPT_FILENAME']) . '/uploads/', 'upload_url' => $this->uploader->uploadURL ?: WebApp::get()->request()->getWebRoot() . 'uploads/', 'mkdir_mode' => 0775, 'param_name' => $this->uploader->name, 'delete_type' => 'DELETE', 'access_control_allow_origin' => '*', 'access_control_allow_credentials' => false, 'access_control_allow_methods' => ['OPTIONS', 'HEAD', 'GET', 'POST', 'PUT', 'PATCH', 'DELETE'], 'access_control_allow_headers' => ['Content-Type', 'Content-Range', 'Content-Disposition'], 'download_via_php' => false, 'readfile_chunk_size' => 10 * 1024 * 1024, 'inline_file_types' => '/\\.(gif|jpe?g|png)$/i', 'accept_file_types' => '/.+$/i', 'max_file_size' => null, 'min_file_size' => 1, 'max_number_of_files' => null, 'image_file_types' => '/\\.(gif|jpe?g|png)$/i', 'correct_image_extensions' => false, 'max_width' => null, 'max_height' => null, 'min_width' => 1, 'min_height' => 1, 'discard_aborted_uploads' => true, 'image_library' => 1, 'convert_bin' => 'convert', 'identify_bin' => 'identify', 'image_versions' => ['' => ['auto_orient' => true], 'thumbnail' => ['max_width' => 200, 'max_height' => 200]], 'print_response' => true] + $this->options;
     parent::init($config);
 }
Beispiel #3
0
 /**
  * Load messages from session
  * @param array $config
  */
 protected function init($config = array())
 {
     $this->messages = isset($_SESSION[$this->sessionKey]) ? $_SESSION[$this->sessionKey] : array();
     return parent::init($config = array());
 }