Created
January 8, 2017 19:16
-
-
Save acrosman/e002ad2c529820271e09de58fc71307f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Drupal\sitemanager\Plugin; | |
use Drupal\Component\Plugin\PluginInspectionInterface; | |
/** | |
* Defines an interface for Task plugin plugins. | |
*/ | |
interface TaskPluginInterface extends PluginInspectionInterface { | |
/** | |
* Return the name of the task. | |
* | |
* @return string | |
* returns the name as a string. | |
*/ | |
public function getTaskName(); | |
/** | |
* Returns the status of the task defined by this plugin. | |
* | |
* @return string | |
* Returns: "Success" or "Error". | |
*/ | |
public function getTaskStatus(); | |
/** | |
* Builds and returns a render array for the task. | |
* | |
* @return array | |
* Returns a render array for the output of the task; | |
*/ | |
public function getTaskOutput(); | |
/** | |
* Runs the task (is the definition of the task). | |
* | |
* @param Site $site | |
* The site entity to be used. | |
* | |
* @return string | |
* Returns: getTaskStatus(); | |
*/ | |
public function run(Site $site); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment