Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
studip-plugin-base
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marcus Eibrink-Lunzenauer
studip-plugin-base
Commits
0f7b2f5c
Commit
0f7b2f5c
authored
Nov 26, 2021
by
Marcus Eibrink-Lunzenauer
Browse files
Options
Downloads
Patches
Plain Diff
Add unstaged files
parent
6cf28b73
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
ExamplePlugin.php
+24
-2
24 additions, 2 deletions
ExamplePlugin.php
with
24 additions
and
2 deletions
ExamplePlugin.php
+
24
−
2
View file @
0f7b2f5c
...
@@ -14,8 +14,30 @@ class ExamplePlugin extends StudIPPlugin implements
...
@@ -14,8 +14,30 @@ class ExamplePlugin extends StudIPPlugin implements
require_once
'vendor/autoload.php'
;
require_once
'vendor/autoload.php'
;
}
}
public
function
perform
(
$unconsumedPath
)
/**
{
* This method dispatches all actions.
*
* @param string part of the dispatch path that was not consumed
*
* @return void
*/
public
function
perform
(
$unconsumedPath
)
{
$args
=
explode
(
'/'
,
$unconsumedPath
);
$trailsRoot
=
$this
->
getPluginPath
();
$trailsUri
=
rtrim
(
PluginEngine
::
getLink
(
$this
,
[],
null
,
true
),
'/'
);
$dispatcher
=
new
Trails_Dispatcher
(
$trailsRoot
,
$trailsUri
,
'index'
);
$dispatcher
->
current_plugin
=
$this
;
try
{
$dispatcher
->
dispatch
(
$unconsumedPath
);
}
catch
(
Trails_UnknownAction
$exception
)
{
if
(
count
(
$args
)
>
0
)
{
throw
$exception
;
}
else
{
throw
new
Exception
(
_
(
'unbekannte Plugin-Aktion: '
)
.
$unconsumedPath
);
}
}
}
}
/* Interface Methods */
/* Interface Methods */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment