misc.php 892 B

1234567891011121314151617181920212223242526272829
  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 = [
  17. 'debug' => true,
  18. 'settings' => [
  19. 'YouTube' => [
  20. $this->settingsOption('token', 'youtubeAPI', ['label' => 'Youtube API Key', 'help' => 'Please make sure to input this API key as the organizr one gets limited']),
  21. $this->settingsOption('html', null, ['override' => 6, 'label' => 'Instructions', 'html' => '<a href="https://www.slickremix.com/docs/get-api-key-for-youtube/" target="_blank">Click here for instructions</a>']),
  22. ]
  23. ]
  24. ];
  25. return array_merge($homepageInformation, $homepageSettings);
  26. }
  27. }