mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-03-06 07:28:29 -05:00
Add behaviour to configure action (extensions)
- Put extension configure view in dir_ext/configure.phtml - Handle POST action in Extension->handleConfigureAction() method See https://github.com/FreshRSS/FreshRSS/issues/252
This commit is contained in:
@@ -86,6 +86,27 @@ class Minz_Extension {
|
||||
return $this->is_enabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the content of the configure view for the current extension.
|
||||
*
|
||||
* @return the html content from ext_dir/configure.phtml, false if it does
|
||||
* not exist.
|
||||
*/
|
||||
public function getConfigureView() {
|
||||
$filename = $this->path . '/configure.phtml';
|
||||
if (!file_exists($filename)) {
|
||||
return false;
|
||||
}
|
||||
return @file_get_contents($filename);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the configure POST action.
|
||||
*
|
||||
* It must be redefined by child classes.
|
||||
*/
|
||||
public function handleConfigureAction() {}
|
||||
|
||||
/**
|
||||
* Getters and setters.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user