public function execute()
 {
     waHtmlControl::registerControl('ReplaceMap', __CLASS__ . "::controlReplaceMap");
     $this->plugin_id = 'import';
     parent::execute();
     $this->getResponse()->addJs('plugins/import/js/settings.js?' . wa()->getVersion(), true)->addJs('js/jquery.form.js', true);
     $protocols = array();
     $protocols['wordpress'] = array('name' => 'WordPress', 'description' => _wp('Import posts and comments from a WordPress blog'));
     $protocols['lj'] = array('name' => 'LiveJournal', 'description' => _wp('Import posts from a LiveJournal blog (comments are not imported)'));
     $this->view->assign('protocols', $protocols);
 }
 public function execute()
 {
     waHtmlControl::registerControl('ReplaceMap', array($this, 'controlReplaceMap'));
     $this->plugin_id = 'import';
     parent::execute();
     $this->getResponse()->addJs('plugins/import/js/settings.js?' . wa()->getVersion(), true)->addJs('js/jquery.form.js', true);
     $protocols = array();
     $protocols['wordpress'] = array('name' => _wp('WordPress'), 'description' => _wp('Import posts and comments from a WordPress blog'));
     $protocols['lj'] = array('name' => _wp('LiveJournal'), 'description' => _wp('Import posts from a LiveJournal blog (comments are not imported)'));
     $protocols['webasystSame'] = array('name' => _wp('WebAsyst Shop-Script (same server)'), 'description' => _wp('Import news from WebAsyst Shop-Script (older version of the Shop-Script app)'));
     $protocols['webasystRemote'] = array('name' => _wp('WebAsyst Shop-Script (remote server)'), 'description' => _wp('Import news from WebAsyst Shop-Script (older version of the Shop-Script app)'));
     $this->view->assign('protocols', $protocols);
 }
Пример #3
0
 private function __construct()
 {
     $config = wa('shop')->getConfig();
     $files = array($config->getConfigPath('dimension.php'), $config->getConfigPath('data/dimension.php', false));
     foreach ($files as $file_path) {
         if (file_exists($file_path)) {
             $config = (include $file_path);
             if ($config && is_array($config)) {
                 $this->units = $config;
                 break;
             }
         }
     }
     waHtmlControl::registerControl(__CLASS__, array(__CLASS__, 'getControl'));
 }
Пример #4
0
 public function getControls($params = array())
 {
     waHtmlControl::registerControl('RedirectControl', array($this, 'settingRedirectControl'));
     return parent::getControls($params);
 }
Пример #5
0
 /**
  * Register user input control
  * @param string $type
  * @param callback $callback
  * @return waShipping Current object
  */
 protected function registerControl($type, $callback = null)
 {
     if (is_null($callback)) {
         $callback = array(get_class($this), "setting{$type}");
     }
     waHtmlControl::registerControl($type, $callback);
     return $this;
 }
Пример #6
0
 private static function registerControl($self)
 {
     waHtmlControl::registerControl(self::MAP_CONTROL, array($self, 'getCsvmapControl'));
     waHtmlControl::registerControl(self::TABLE_CONTROL, array($self, 'getCsvtableControl'));
 }