Definition at line 9 of file connectable_navigator.inc.
◆ __construct()
ConnectableNavigator::__construct |
( |
|
$id, |
|
|
|
$title, |
|
|
|
$source, |
|
|
|
$handler |
|
) |
| |
◆ createPanel()
ConnectableNavigator::createPanel |
( |
| ) |
|
Definition at line 27 of file connectable_navigator.inc.
29 $url = $this->handler.
"?".($this->source->getPrimaryKey()).
"=".($this->source->get($this->source->getPrimaryKey()));
32 $this->panel =
new Panel($this->
id.
"_panel",
$url);
Panel provides a reloadable panel tied to an action handler.
◆ draw()
ConnectableNavigator::draw |
( |
| ) |
|
◆ drawNavigator()
ConnectableNavigator::drawNavigator |
( |
| ) |
|
Definition at line 105 of file connectable_navigator.inc.
109 if (!$this->source->get($this->source->getPrimaryKey())) $this->
enabled =
false;
111 <div
id=
"<?echo $this->id?>" class=
"connectable_navigator">
112 <span
class=
"title"><?echo $this->
title?></span>
static getTargetClasses($sourceItem)
Return an array of connectable target classes for the specified item.
◆ drawTarget()
ConnectableNavigator::drawTarget |
( |
|
$target | ) |
|
Definition at line 50 of file connectable_navigator.inc.
52 trace(
"Drawing target: $target for source ".get_class($this->source), 3);
59 $icon =
$obj->getConnectableDisabledIcon();
61 <li><img src=
"<?echo $icon?>" alt=
"<?echo $name?>" title=
"<?echo $name?>" class=
"disabled"/>
71 <li><img src=
"<?echo $icon?>" alt=
"<?echo $name?>" title=
"<?echo $name?>" data-count=
"<?echo $count?>"/>
73 <span
class=
'title'><?echo
$name?></span><br/>
79 echo $item->getConnectableLink($this->source).
"<br/>";
84 echo
"There are no related $name<br/>";
87 $from = get_class($this->source).
":".$this->source->get($this->source->getPrimaryKey());
91 if (method_exists(
$obj, getConnectableCreateHandler))
93 $createHandler =
$obj->getConnectableCreateHandler();
94 $createHandler =
" onclick='{$createHandler}(\"{$createURL}\"); return false;'";
99 <a
class=
'button small' href=
'#' onclick=
'ConnectableNavigator.selectConnectables("<?echo $from?>", "<?echo $target?>", "<?echo $name?>"); return false'>Select...</a>&
nbsp;&
nbsp;&
nbsp;&
nbsp;<a
class=
'button small' href=
'<?echo $createURL?>'<?echo $createHandler?>>Create...</a>
static getConnectedItems($sourceItem, $targetClass, $constraint="")
Returns the connected items for the specified source that are of the specified class.
◆ writeScript()
ConnectableNavigator::writeScript |
( |
| ) |
|
Definition at line 35 of file connectable_navigator.inc.
38 <script type=
"text/javascript" src=
"/components/connectable/js/connectable_navigator.js"></script>
39 <script type=
"text/javascript">
40 var {$this->
id}_ConnectableNavigator;
41 window.addEvent(
'load',
function()
◆ $enabled
ConnectableNavigator::$enabled = true |
◆ $handler
ConnectableNavigator::$handler |
◆ $id
ConnectableNavigator::$id |
◆ $panel
ConnectableNavigator::$panel |
◆ $source
ConnectableNavigator::$source |
◆ $title
ConnectableNavigator::$title |
The documentation for this class was generated from the following file: