#225 Allow element plugins to control if they can be added

This commit is contained in:
Alexander Bias 2018-08-08 13:45:20 +02:00 committed by Mark Nelson
parent 706912c52f
commit fcaf1fefd5
2 changed files with 15 additions and 2 deletions

View file

@ -352,6 +352,16 @@ abstract class element {
return true;
}
/**
* This defines if an element plugin can be added to a certificate.
* Can be overridden if an element plugin wants to take over the control.
*
* @return bool returns true if the element can be added, false otherwise
*/
public static function allow_add() {
return true;
}
/**
* Handles rendering the element on the pdf.
*