You are here

public function FBAutopost::setType in Facebook Autopost 7

Sets the type value.

Parameters

string $type: The type as defined in FBAutopost::types.

Return value

FBAutopost Returns itself

Throws

FBAutopostException

1 call to FBAutopost::setType()
FBAutopost::publish in class/FBAutopost.php
Publishes content in the selected pages

File

class/FBAutopost.php, line 424

Class

FBAutopost
API class to handle common actions when autoposting This class uses FBAutopostException for error handling. Severity is passed resusing watchdog severity (See: http://api.drupal.org/api/drupal/includes%21bootstrap.inc/function/watch...)

Code

public function setType($type) {
  if (!in_array($type, array_keys($this->publication_types))) {
    throw new FBAutopostException(t('The publication type you specified is invalid.'), FBAutopost::incorrect_param, WATCHDOG_ERROR);
  }
  $this->type = $type;
  return $this;
}