Exemplo n.º 1
0
 /**
  * Event thrown when some content change its state
  *
  * @param string  $context Component context
  * @param array   $pks     Primary key values of the element changed
  * @param integer $value   New state value
  *
  * @return void
  */
 public function onContentChangeState($context, $pks, $value)
 {
     if ($value == -2) {
         $tableName = NenoHelperBackend::getTableNameBasedOnComponentContext($context);
         if ($tableName !== false) {
             /* @var $table NenoContentElementTable */
             $table = NenoContentElementTable::load(array('table_name' => $tableName), false);
             foreach ($pks as $pk) {
                 $this->trashTranslations($table, $pk);
             }
         }
     }
 }