Function Module_cms_galleries_alt->check_videos_allowed

Definitions

cms/pages/modules/cms_galleries.php

  • Kills the software if someone is trying to add a video to a gallery that does not support videos.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: int

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$cat ID_TEXT No No required parameter N/A N/A The gallery
$tolerate_non_exist boolean No No False N/A N/A Whether to tolerate the non-existence of the gallery

Returns

  • Number allowed remaining (null: no limit)
  • Type: ?integer
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Kills the software if someone is trying to add a video to a gallery that does not support videos.
 *
 * @param  ID_TEXT $cat The gallery
 * @param  boolean $tolerate_non_exist Whether to tolerate the non-existence of the gallery
 * @return ?integer Number allowed remaining (null: no limit)
 */

public function check_videos_allowed(string $cat, bool $tolerate_non_exist = false) : ?int