Skip to content

Youtube_Form_Import

Ned Henry edited this page Jun 6, 2014 · 1 revision

Youtube_Form_Import

YoutubeImport form class

  • Class name: Youtube_Form_Import
  • Namespace:
  • Parent class: Omeka_Form

Methods

\Youtube_Form_Import::init()

void Youtube_Form_Import::\Youtube_Form_Import::init()()

Construct the import form.

  • Visibility: public

\Youtube_Form_Import::_registerElements()

void Youtube_Form_Import::\Youtube_Form_Import::_registerElements()()

Define the form elements.

  • Visibility: private

\Youtube_Form_Import::ProcessPost()

bool Youtube_Form_Import::\Youtube_Form_Import::ProcessPost()()

Process the form data and import the photos as necessary

  • Visibility: public
  • This method is static.

\Youtube_Form_Import::_importSingle()

bool Youtube_Form_Import::\Youtube_Form_Import::_importSingle()()

Import a single video in real time (not in the background).

This function relies on the import form output being in the $_POST variable. The form should be validated before calling this.

  • Visibility: private
  • This method is static.

\Youtube_Form_Import::_getRoleOptions()

array Youtube_Form_Import::\Youtube_Form_Import::_getRoleOptions()()

Get an array to be used in formSelect() containing possible user roles.

  • Visibility: private

\Youtube_Form_Import::applyOmekaStyles()

void Youtube_Form_Import::\Youtube_Form_Import::applyOmekaStyles()()

Overrides standard omeka form behavior to fix radio display bug

  • Visibility: public

\Youtube_Form_Import::_getCollectionOptions()

array Youtube_Form_Import::\Youtube_Form_Import::_getCollectionOptions()()

Get an array to be used in formSelect() containing all collections.

  • Visibility: private

\Youtube_Form_Import::_resolveShortUrl()

string Youtube_Form_Import::\Youtube_Form_Import::_resolveShortUrl()(string $shortUrl)

Resolve a shortened URL and return the full url

  • Visibility: private
  • This method is static.

Arguments

  • $shortUrl string - <p>The shortened Flickr url of the photo to import.</p>

\Youtube_Form_Import::_resolveRedirect()

string Youtube_Form_Import::\Youtube_Form_Import::_resolveRedirect()(string $url)

Resolve a redirect and return the redirected url

  • Visibility: private
  • This method is static.

Arguments

  • $url string - <p>The url which is redirected.</p>

\Youtube_Form_Import::validateYoutubeUrl()

bool Youtube_Form_Import::\Youtube_Form_Import::validateYoutubeUrl()(string $url, array $args)

Validate the youtube url

  • Visibility: public

Arguments

  • $url string - <p>The url to be validated</p>
  • $args array - <p>An empty options array for now.</p>