You are here

function kaltura_block in Kaltura 5

Same name and namespace in other branches
  1. 6.2 kaltura.module \kaltura_block()
  2. 6 kaltura.module \kaltura_block()

File

./kaltura.module, line 533

Code

function kaltura_block($op = 'list', $delta = 0, $edit = array()) {
  if ($op == 'list') {
    $blocks[0] = array(
      'info' => t('Upload media block'),
      'weight' => 0,
      'status' => 0,
    );
    return $blocks;
  }
  elseif ($op == 'configure' && $delta == 0) {
  }
  elseif ($op == 'save' && $delta == 0) {
  }
  elseif ($op == 'view') {
    switch ($delta) {
      case 0:
        if (user_access('create kaltura items')) {
          $block = array(
            'subject' => t('Upload Media'),
            'content' => kaltura_upload_block(),
          );
        }
        break;
    }
    return $block;
  }
}