trigger() public method

public trigger ( array $row, string $table, string $field, string $extensionKey = NULL ) : boolean
$row array
$table string
$field string
$extensionKey string
return boolean
Esempio n. 1
0
 /**
  * @param array $row
  * @param string $table
  * @param string $field
  * @param string $extensionKey
  * @return bool
  */
 public function trigger(array $row, $table, $field, $extensionKey = NULL)
 {
     if ('tt_content' === $table && NULL === $field) {
         // This Provider will bypass checking for matched plugin-
         // and/or content type in the case where $field is NULL.
         // This case is triggered *once* per record from our
         // TCEMain class; subsequent calls all have a $field and
         // will pass through to the basic trigger() method.
         // Note for implementers: if you subclass this ContentProvider
         // in your own extension (which is perfectly valid to do!)
         // please consider if you must override the trigger() method
         // to ensure that your particular Provider only reacts when
         // users save records that your Provider actually supports.
         return TRUE;
     }
     return parent::trigger($row, $table, $field, $extensionKey);
 }
 /**
  * @param array $row
  * @param string $table
  * @param string $field
  * @param string $extensionKey
  * @return boolean
  */
 public function trigger(array $row, $table, $field, $extensionKey = NULL)
 {
     $this->currentFieldName = $field;
     return parent::trigger($row, $table, $field, $extensionKey);
 }
Esempio n. 3
0
 /**
  * Note: This Provider will -always- trigger on tt_content list_type records (plugin)
  * but has the lowest possible (0) priority, ensuring that any
  * Provider which wants to take over, can do so.
  *
  * @param array $row
  * @param string $table
  * @param string $field
  * @param string $extensionKey
  * @return boolean
  */
 public function trigger(array $row, $table, $field, $extensionKey = NULL)
 {
     if ($table === $this->tableName && FALSE === empty($row['list_type'])) {
         return TRUE;
     }
     return parent::trigger($row, $table, $field, $extensionKey);
 }