misc.php 1003 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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. 'debug' => true,
  18. 'settings' => array(
  19. 'YouTube' => array(
  20. array(
  21. 'type' => 'input',
  22. 'name' => 'youtubeAPI',
  23. 'label' => 'Youtube API Key',
  24. 'value' => $this->config['youtubeAPI'],
  25. 'help' => 'Please make sure to input this API key as the organizr one gets limited'
  26. ),
  27. array(
  28. 'type' => 'html',
  29. 'override' => 6,
  30. 'label' => 'Instructions',
  31. 'html' => '<a href="https://www.slickremix.com/docs/get-api-key-for-youtube/" target="_blank">Click here for instructions</a>'
  32. ),
  33. )
  34. )
  35. );
  36. return array_merge($homepageInformation, $homepageSettings);
  37. }
  38. }