コード例 #1
0
 /**
  * Construct this view
  * @param joppa\form\backend\SiteSelectForm $siteSelectForm
  * @param joppa\form\backend\NodeVisibilityForm $nodeVisibilityForm
  * @param joppa\model\Site $site the current site
  * @param joppa\model\Node $node the current node (optional)
  */
 public function __construct(SiteSelectForm $siteSelectForm, NodeVisibilityForm $nodeVisibilityForm, Site $site, Node $node = null)
 {
     parent::__construct($siteSelectForm, $site, $node, 'joppa/backend/node.visibility');
     $this->set('node', $node);
     $this->set('form', $nodeVisibilityForm);
     $this->addStyle(self::STYLE);
 }
コード例 #2
0
 /**
  * Construct this view
  * @param joppa\form\backend\SiteSelectForm $siteSelectForm
  * @param joppa\model\Site $site
  * @param joppa\model\Node $node
  * @param zibo\library\widget\controller\Widget $widget
  * @param zibo\core\View $propertiesView
  */
 public function __construct(SiteSelectForm $siteSelectForm, Site $site, Node $node, Widget $widget, View $propertiesView = null)
 {
     parent::__construct($siteSelectForm, $site, $node, 'joppa/backend/widget.properties');
     $this->set('widget', $widget);
     if ($propertiesView) {
         $this->setSubview('properties', $propertiesView);
     }
 }
コード例 #3
0
 /**
  * Construct this view
  * @param joppa\form\backend\SiteSelectForm $siteSelectForm form to select the current site
  * @param joppa\form\backend\NodeForm $nodeForm form to edit the properties of the node
  * @param joppa\model\Site $site the current site
  * @param joppa\model\Node $node the current node (optional)
  * @param string $template template for the view (optional)
  * @return null
  */
 public function __construct(SiteSelectForm $siteSelectForm, NodeForm $nodeForm, Site $site = null, Node $node = null, $template = 'joppa/backend/node')
 {
     parent::__construct($siteSelectForm, $site, $node, $template);
     $this->set('node', $node);
     $this->set('form', $nodeForm);
     $nameField = $nodeForm->getField(NodeForm::FIELD_NAME);
     $this->addInlineJavascript('$("#' . $nameField->getId() . '").focus()');
 }
コード例 #4
0
 /**
  * Construct this view
  * @param joppa\form\backend\SiteSelectForm $siteSelectForm form to select another site
  * @param joppa\form\backend\NodeSettingsForm $nodeSettingsForm form to edit the node settings
  * @param joppa\model\Site $site the current site
  * @param joppa\model\Node $node the current node
  * @return null
  */
 public function __construct(SiteSelectForm $siteSelectForm, NodeSettingsForm $nodeSettingsForm, Site $site, Node $node)
 {
     parent::__construct($siteSelectForm, $site, $node, 'joppa/backend/node.advanced');
     $nodeSettings = $nodeSettingsForm->getNodeSettings(false);
     $settings = $this->getHtmlFromNodeSettings($nodeSettings);
     $this->set('node', $node);
     $this->set('form', $nodeSettingsForm);
     $this->set('settings', $settings);
     $this->addStyle(self::STYLE);
     $this->addInlineJavascript("joppaInitializeAdvanced();");
 }
コード例 #5
0
 /**
  * Construct this view
  * @param joppa\form\backend\SiteSelectForm $siteSelectForm
  * @param joppa\form\backend\RegionSelectForm $regionSelectForm
  * @param joppa\model\Site $site
  * @param joppa\model\Node $node
  * @param string $region
  * @param array $availableWidgets
  * @param array $regionWidgets (optional)
  * @return null
  */
 public function __construct(SiteSelectForm $siteSelectForm, RegionSelectForm $regionSelectForm, Site $site, Node $node, $region, array $availableWidgets, array $regionWidgets = array(), $widgetDeleteMessage)
 {
     parent::__construct($siteSelectForm, $site, $node, 'joppa/backend/node.content');
     $this->set('page', $node);
     $this->set('form', $regionSelectForm);
     $this->set('region', $region);
     $this->set('availableWidgets', $availableWidgets);
     $this->set('regionWidgets', $regionWidgets);
     $this->set('baseUrl', $regionSelectForm->getAction() . '/');
     $this->addStyle(self::STYLE);
     $this->addInlineJavascript("joppaInitializeContent('" . $regionSelectForm->getAction() . "/', '" . $widgetDeleteMessage . "');");
 }