misc.php 983 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. trait MiscHomepageItem
  3. {
  4. public function miscSettingsArray($infoOnly = false)
  5. {
  6. $homepageInformation = [
  7. 'name' => 'Misc',
  8. 'enabled' => true,
  9. 'image' => 'plugins/images/organizr/logo-no-border.png',
  10. 'category' => 'Custom',
  11. 'settingsArray' => __FUNCTION__
  12. ];
  13. if ($infoOnly) {
  14. return $homepageInformation;
  15. }
  16. $homepageSettings = array(
  17. 'settings' => array(
  18. 'YouTube' => array(
  19. array(
  20. 'type' => 'input',
  21. 'name' => 'youtubeAPI',
  22. 'label' => 'Youtube API Key',
  23. 'value' => $this->config['youtubeAPI'],
  24. 'help' => 'Please make sure to input this API key as the organizr one gets limited'
  25. ),
  26. array(
  27. 'type' => 'html',
  28. 'override' => 6,
  29. 'label' => 'Instructions',
  30. 'html' => '<a href="https://www.slickremix.com/docs/get-api-key-for-youtube/" target="_blank">Click here for instructions</a>'
  31. ),
  32. )
  33. )
  34. );
  35. return array_merge($homepageInformation, $homepageSettings);
  36. }
  37. }