Guest User

Untitled

a guest
Oct 20th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. public function getExporter() {
  2. if (empty($this->exporter)) {
  3. if (class_exists($this->info['exporter class'])) {
  4. $reflection = new \ReflectionClass($this->info['exporter class']);
  5. if ($reflection->implementsInterface('Drupal\ctools\ExporterInterface')) {
  6. $this->exporter = $reflection->newInstance();
  7. }
  8. else {
  9. return FALSE;
  10. }
  11. }
  12. else {
  13. return FALSE;
  14. }
  15. }
  16.  
  17. return $this->exporter;
  18. }
Add Comment
Please, Sign In to add comment