t('Asset Upload'), 'title' => t('Upload a new file.'), 'src' => url(drupal_get_path('module','asset').'/lullacons/doc-option-add.png'), ); return $methods; case 'form': $form['upload'] = array( '#type' => 'file', '#title' => t('New File'), ); return $form; case 'validate': break; case 'submit': break; } } /** * Define custom asset formatter(s). * * @param $op * The operation being performed. Possible values: * - 'info': * - 'options': * - 'render': * - 'preview': * - 'details': * - 'img': * @param $asset * The full asset object being used * @param $attr * An array of attributes, either directly created or parsed from a macro * @return * - 'info': an array of formatter arrays, each including name (required), * types (required), and description (optional) elements. * - 'options': a forms api array to collect formatting options. * - 'render': the html representation of the macro. * - 'preview': the html preview for the preview pane * - 'details': an array of details with key as t()'ed label * - 'img': the path to an img for use inside WYSIWYG editors */ function hook_asset_formatter($op = 'info', $asset = NULL, $attr = array()){ switch($op){ case 'info': break; case 'options': break; case 'render': break; case 'preview': break; case 'details': break; case 'img': break; } } function hook_assetapi($op){ switch($op){ case 'load': break; case 'insert': break; case 'update': break; case 'delete': break; } }