You are here

function scald_is_registered in Scald: Media Management made easy 7

Same name and namespace in other branches
  1. 6 scald.module \scald_is_registered()

Load a Scald Atom.

Parameters

int $sid: The Scald Atom ID.

Return value

mixed

  • A Scald Atom entity if the Scald ID is valid.
  • FALSE if the atom can not be loaded.
2 calls to scald_is_registered()
scald_render in ./scald.module
Render a Scald Atom.
scald_unregister_atom in ./scald.module
Unregister a Scald Atom.

File

./scald.module, line 621
The Scald Core, which handles all Scald Registries and dispatch.

Code

function scald_is_registered($sid, $rebuild = FALSE) {

  // Argument validation.
  if (!is_numeric($sid)) {
    return FALSE;
  }
  $sid = (int) $sid;
  $atoms = entity_load('scald_atom', array(
    $sid,
  ), array(), $rebuild);
  return reset($atoms);
}