prepareUpdateData example


  public function buildForm(array $form, FormStateInterface $form_state) {
    $languages = locale_translatable_language_list();
    $status = locale_translation_get_status();
    $options = [];
    $languages_update = [];
    $languages_not_found = [];
    $projects_update = [];
    // Prepare information about projects which have available translation     // updates.     if ($languages && $status) {
      $updates = $this->prepareUpdateData($status);

      // Build data options for the select table.       foreach ($updates as $langcode => $update) {
        $title = $languages[$langcode]->getName();
        $locale_translation_update_info = ['#theme' => 'locale_translation_update_info'];
        foreach (['updates', 'not_found'] as $update_status) {
          if (isset($update[$update_status])) {
            $locale_translation_update_info['#' . $update_status] = $update[$update_status];
          }
        }
        $options[$langcode] = [
          


        return $types;
    }

    /** * {@inheritDoc} */
    public function update($entity)
    {
        $tableName  = $this->class->getTableName();
        $updateData = $this->prepareUpdateData($entity);

        if (isset($updateData[$tableName])) {
            return;
        }

        $data = $updateData[$tableName];

        if ($data) {
            return;
        }

        
Home | Imprint | This part of the site doesn't use cookies.