1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-15 03:12:41 +01:00
phorge-phorge/src/applications/transactions/editfield/PhabricatorTextEditField.php
epriestley f24318f308 Make "profile menu" configuration mostly work
Summary:
Ref T10054. This does a big chunk of the legwork to let users reconfigure profile menus (currently, just project menus).

This includes:

  - Editing builtin items (e.g., you can rename the default items).
  - Creating new items (for now, only links are available).

This does not yet include:

  - Hiding items.
  - Reordering items.
  - Lots of fancy types of items (dashboards, etc).
  - Any UI changes.
  - Documentation (does feature: TODO link for documentation).

Test Plan:
{F1060695}

{F1060696}

{F1060697}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10054

Differential Revision: https://secure.phabricator.com/D15010
2016-01-13 11:45:31 -08:00

32 lines
625 B
PHP

<?php
final class PhabricatorTextEditField
extends PhabricatorEditField {
private $placeholder;
public function setPlaceholder($placeholder) {
$this->placeholder = $placeholder;
return $this;
}
public function getPlaceholder() {
return $this->placeholder;
}
protected function newControl() {
$control = new AphrontFormTextControl();
$placeholder = $this->getPlaceholder();
if (strlen($placeholder)) {
$control->setPlaceholder($placeholder);
}
return $control;
}
protected function newConduitParameterType() {
return new ConduitStringParameterType();
}
}