public function getCMSFields() { $pageDropDown = new DropdownField('SiteTreeID', 'LinkedPage', SiteTree::get()->sort('Title')->map('ID', 'Title')); $pageDropDown->setEmptyString('(Select Page)'); $fields = parent::getCMSFields(); $fields->push($pageDropDown); $fields->push(new TextField('LinkLabel')); return $fields; }
public function getCMSFields() { $locationDropDown = new DropdownField('LocationID', 'Choose Location', $this->getLocationOptions()); $locationDropDown->setEmptyString('(Select Location)'); $locationDropDown->setDescription('Create new Locations in Model Admin'); $fields = parent::getCMSFields(); $fields->push($locationDropDown); return $fields; }
/** * (non-PHPdoc) * * @see \Widgets\WidgetBase::widget() */ public function widget($args, $instance) { /* * Put all special URLs */ $instance['logoutUrl'] = wp_logout_url(home_url()); $instance['loginUrl'] = wp_login_url(home_url()); $instance['registrationUrl'] = wp_registration_url(); $instance['lostPasswordUrl'] = wp_lostpassword_url(); $instance['postsUrl'] = '/wp-admin/edit.php'; /* * And call the widget func from the parent class WidgetBase. */ parent::widget($args, $instance); }
public function __construct($controller, $properties = []) { $this->properties = $this->validateProperties($properties); parent::__construct($controller); }
/** * Returns a unique ID for this widget. Useful in creating HTML markup. */ public function getId($suffix = null) { $id = parent::getId($suffix); $id .= '-' . $this->columnName; return $id; }
protected function doInit() { $this->html = \Psc\HTML\HTML::tag('div'); parent::doInit(); }