Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ID#133: Updated documentation for new allowExecution method #3

Merged
merged 1 commit into from Mar 31, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 24 additions & 0 deletions DOCS/pres/content/c_de_012_3.X_frontcontroller.html
Expand Up @@ -850,6 +850,30 @@ <h4 id="Chapter-6-2-Priorisierung"><a href="#Chapter-6-2-Priorisierung">6.2. Pri
}
</gen:highlight>

<h4 id="Chapter-6-3-Berechtigung-Ausfuehren"><a href="#Chapter-6-3-Berechtigung-Ausfuehren">6.3. Berechtigung zum Ausführen</a></h4>
<p>
Über die Methode <em>allowExecution()</em> können Sie seit der APF-Version 3.2. auch die Berechtigung zum Ausführen
der Action beeinflussen. Das Verhalten ist dabei der Methode <a href="#Chapter-6-1-Aktivierung-Deaktivierung">isActive()</a>
nachempfunden.
Die Action wird nur ausgeführt, wenn die Methode <em>allowExecution()</em> <em>true</em> zurück liefert.
</p>
<p>
Das folgende Beispiel sorgt dafür, dass die Action nur dann ausgeführt wird, wenn ein User durch das Usermanagement-Modul
eingeloggt ist:
</p>
<gen:highlight type="php">
use APF\modules\usermanagement\pres\condition\UserDependentContentConditionSet;

public function allowExecution() {
$condSet = $this->getServiceObject('APF\modules\usermanagement\pres\condition\UserDependentContentConditionSet');
if ($condSet->conditionMatches($this->getContext(), 'logged-in', '')) {
return true;
} else {
return false;
}
}
</gen:highlight>

<h3 id="Chapter-7-Generierung-von-Links"><a href="#Chapter-7-Generierung-von-Links">7. Generierung von Links</a></h3>
<p>
Die Gestaltung des URL-Layouts übernehmen im APF die <int:link pageid="137">Input- und Output-Filter</int:link> sowie
Expand Down
22 changes: 22 additions & 0 deletions DOCS/pres/content/c_en_012_3.X_frontcontroller.html
Expand Up @@ -822,6 +822,28 @@ <h4 id="Chapter-6-2-Prioritization"><a href="#Chapter-6-2-Prioritization">6.2. P
}
</gen:highlight>

<h4 id="Chapter-6-3-Permission-Execution"><a href="#Chapter-6-3-Permission-Execution">6.3. Permission to execute</a></h4>
<p>
By using the method <em>allowExecution()</em> you can affect the permission to execute the action. The behavior is
the same like the <a href="#Chapter-6-1-Activation-deactivation">isActive()</a> method. The action is only executed
if the method <em>allowExecution()</em> returns <em>true</em>.
</p>
<p>
The following example ensures that the action will only be executed when a User is logged in by the Usermanagement-module:
</p>
<gen:highlight type="php">
use APF\modules\usermanagement\pres\condition\UserDependentContentConditionSet;

public function allowExecution() {
$condSet = $this->getServiceObject('APF\modules\usermanagement\pres\condition\UserDependentContentConditionSet');
if ($condSet->conditionMatches($this->getContext(), 'logged-in', '')) {
return true;
} else {
return false;
}
}
</gen:highlight>

<h3 id="Chapter-7-Generation-of-links"><a href="#Chapter-7-Generation-of-links">7. Generation of links</a></h3>
<p>
The URL scheme of the APF is defined by <int:link pageid="137">input and output filters</int:link> and their
Expand Down
1 change: 1 addition & 0 deletions DOCS/pres/quicknavi/n_de_012_3.X_frontcontroller.html
Expand Up @@ -32,6 +32,7 @@ <h2>QUICKNAVI</h2>
<ol>
<li><a href="#Chapter-6-1-Aktivierung-Deaktivierung" title="6.1. Aktivierung/Deaktivierung">Aktivierung/Deaktivierung</a></li>
<li><a href="#Chapter-6-2-Priorisierung" title="6.2. Priorisierung">Priorisierung</a></li>
<li><a href="#Chapter-6-3-Berechtigung-Ausfuehren" title="6.3. Berechtigung zum Ausführen">Berechtigung zum Ausführen</a></li>
</ol>
</li>
<li><a href="#Chapter-7-Generierung-von-Links" title="7. Generierung von Links">Generierung von Links</a></li>
Expand Down
1 change: 1 addition & 0 deletions DOCS/pres/quicknavi/n_en_012_3.X_frontcontroller.html
Expand Up @@ -32,6 +32,7 @@ <h2>QUICKNAVI</h2>
<ol>
<li><a href="#Chapter-6-1-Activation-deactivation" title="6.1. Activation/deactivation">Activation/deactivation</a></li>
<li><a href="#Chapter-6-2-Prioritization" title="6.2. Prioritization">Prioritization</a></li>
<li><a href="#Chapter-6-3-Permission-Execution" title="6.3. Permission to execute">Permission to execute</a></li>
</ol>
</li>
<li><a href="#Chapter-7-Generation-of-links" title="7. Generation of links">Generation of links</a></li>
Expand Down