Skip to content

Commit

Permalink
Renamed setLinkFromUserFunc() to setCustomLink()
Browse files Browse the repository at this point in the history
  • Loading branch information
RexDude committed Nov 14, 2015
1 parent 15d5b1b commit 38c0abf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ Navigation Factory - Changelog
### Version 1.0.0 DEV

* Methode `setUlClass()` zur Klasse `rex_lang_nav` hinzugefügt, thx@darwin

* Methode `setLinkFromUserFunc()` in `setCustomLink()` umbenannt
* Klasse `nav42` umbenannt und aufgeteilt in `rex_nav`, `rex_lang_nav` und `rex_breadcrumb_nav`
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ $nav->setLiIdFromMetaField("cat_css_id"); // li id aus metainfo feld: "cat_css_i
$nav->setLiClassFromMetaField("cat_css_class"); // li klasse aus metainfo feld: "cat_css_class"
$nav->setLiIdFromCategoryId(array(42 => "foo", 43 => "bar")); // li id anhand artikel id
$nav->setLiClassFromCategoryId(array(42 => "my-class")); // li klasse anhand artikel id
$nav->setLinkFromUserFunc(function($cat, $depth) { // php funktion die den link zurückgibt (hier als beispiel: erste ebene ohne verlinkung)
$nav->setCustomLink(function($cat, $depth) { // php funktion die den link zurückgibt (hier als beispiel: erste ebene ohne verlinkung)
if ($depth == 1) {
return htmlspecialchars($cat->getName());
} else {
Expand Down
2 changes: 1 addition & 1 deletion classes/class.rex_nav.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public function setLiClassFromMetaField($liClassFromMetaField) {
$this->liClassFromMetaField = $liClassFromMetaField;
}

public function setLinkFromUserFunc($linkFromUserFunc) {
public function setCustomLink($linkFromUserFunc) {
$this->linkFromUserFunc = $linkFromUserFunc;
}

Expand Down

0 comments on commit 38c0abf

Please sign in to comment.