@param array           $sourceTextGroup
@param DictionaryEntry $entry

@return void
504126
private function processPosFrom(array $sourceTextGroup, DictionaryEntry $entry): void
    {
        if (!empty($sourceTextGroup['pos'])) {
            $entry->setPosFrom(new DictionaryEntryPos($sourceTextGroup['pos']));
        }
    }
171908
public function addEntry(LogEntry $entry)
	{
		// Convert the date.
		$entry->date = $entry->date->format($this->db->getDateFormat());

		$this->db->insertObject($this->table, $entry);
	}
306864
private function checkTextTarget($source, $target): void
    {
        $text_array = $this->text_array;
        if (!(\array_key_exists($source, $text_array))) {
            throw new TencentAIException(90701);
        }
        if (!(\in_array($target, $text_array[$source], true))) {
            throw new TencentAIException(90702);
        }
    }
569796
public function checkPhpFormatFlag(PoEntry $entry): void
    {
        if (preg_match(
            '#(?<!%)%(?:\d+\$)?[+-]?(?:[ 0]|\'.{1})?-?\d*(?:\.\d+)?[bcdeEufFgGosxX]#',
            $entry->get(PoTokens::MESSAGE) . $entry->get(PoTokens::PLURAL)
        )) {
            $entry->addFlag('php-format');
        }
    }
258140
public function addEntry(LogEntry $entry)
	{
		echo $this->priorities[$entry->priority] . ': '
			. $entry->message . (empty($entry->category) ? '' : ' [' . $entry->category . ']')
			. $this->line_separator;
	}
300694
public void updateText(Dim.SourceInfo sourceInfo) {
        this.sourceInfo = sourceInfo;
        String newText = sourceInfo.source();
        if (!textArea.getText().equals(newText)) {
            textArea.setText(newText);
            int pos = 0;
            if (currentPos != -1) {
                pos = currentPos;
            }
            textArea.select(pos);
        }
        fileHeader.update();
        fileHeader.repaint();
    }
584259
public function setSource($sourceIso, $sourcePath, $sourceLanguagePath)
	{
		$this->sourceIso = $sourceIso;
		$this->sourcePath = $sourcePath;
		$this->sourceLanguagePath = $sourceLanguagePath;
		$this->langkeyValidator->setSource($sourceIso, $sourcePath, $sourceLanguagePath);
		return $this;
	}
1167928
protected function updateConditionGroup(ConditionGroupEntity $conditionGroup, $matchedEntry)
    {
        if (array_key_exists('id', $matchedEntry) && isset($matchedEntry['conditions'])) {
            $conditionIds = [];
            foreach ($matchedEntry['conditions'] as $conditionData) {
                if (array_key_exists('id', $conditionData)) {
                    /** @var ConditionEntity $conditionEntity */
                    $conditionEntity = $this->conditionRepository->findById($conditionData['id']);

                    // check if condition exists at all
                    if (!$conditionEntity) {
                        throw new FilterDependencyNotFoundException(
                            self::$conditionEntityName,
                            $conditionData['id']
                        );
                    }

                    // check if conditions is related with condition group
                    if ($conditionEntity->getConditionGroup()->getId() !== $conditionGroup->getId()) {
                        throw new ConditionGroupMismatchException(
                            $matchedEntry['id']
                        );
                    }

                    $conditionIds[] = $conditionEntity->getId();
                } else {
                    $conditionEntity = new ConditionEntity();
                    $conditionEntity->setConditionGroup($conditionGroup);
                    $conditionGroup->addCondition($conditionEntity);
                    $this->em->persist($conditionEntity);
                    $conditionIds[] = $conditionEntity->getId();
                }

                $conditionEntity->setField($this->getProperty($conditionData, 'field', $conditionEntity->getField()));
                $conditionEntity->setOperator(
                    $this->getProperty($conditionData, 'operator', $conditionEntity->getOperator())
                );

                $conditionEntity->setType($this->getProperty($conditionData, 'type', $conditionEntity->getType()));
                $value = $this->getValueForCondition(
                    $this->getProperty($conditionData, 'value', $conditionEntity->getValue()),
                    $conditionEntity->getType()
                );
                $conditionEntity->setValue($value);
            }

            $this->removeNonExistentConditions($conditionGroup, $conditionIds);
        }

        return true;
    }
266726
public function createEntry($group_name, array $options)
    {
        if (! $this->hasGroup($group_name)) {
            throw new \RuntimeException('Menu Group "'.$group_name.'" not found.');
        }

        $entry = new MenuEntry($this->entryOptionsResolver->resolve($options));

        $group = $this->getGroup($group_name);
        $group->addEntry($entry);
    }
937075
protected function insert_event_entries($evententries) {
        if (!$this->init()) {
            return;
        }
        if (!$dbtable = $this->get_config('dbtable')) {
            return;
        }
        try {
            $this->extdb->insert_records($dbtable, $evententries);
        } catch (\moodle_exception $e) {
            debugging('Cannot write to external database: ' . $e->getMessage(), DEBUG_DEVELOPER);
        }
    }
387224
protected function addDirectiveToEntry($key, $value, LdifEntryInterface $entry)
    {
        if ($entry instanceof LdifEntryAdd) {
            $entry->addAttribute($key, $value);
        } elseif ($entry instanceof LdifEntryModDn) {
            $this->addModDnDirective($entry, $key, $value);
        } elseif ($entry instanceof LdifEntryModify) {
            $this->addModifyDirective($entry, $key, $value);
        }
    }
332623
static void replaceEntry(PollArrayWrapper source, int sindex,
                      PollArrayWrapper target, int tindex) {
        target.putDescriptor(tindex, source.getDescriptor(sindex));
        target.putEventOps(tindex, source.getEventOps(sindex));
        target.putReventOps(tindex, source.getReventOps(sindex));
    }
118089
public function characteristicsCreateGroup($entry) {
    $insert = $this->connection->insert('site_commerce_characteristics_group')->fields($entry);
    return $insert->execute();
  }
57289
private function getPaymentStatusFields(Source $source, array $entry)
    {
        $fields = array();
        $paymentStatus = $entry['paymentstatus'];
        $paymentDate = $entry['paymentdate'];

        $paymentStatusText = $paymentStatus !== 0 ? ('payment_status_' . $paymentStatus) : 'unknown';
        if ($paymentStatus === API::PaymentStatus_Paid && !empty($paymentDate)) {
            $paymentStatusText .= '_date';
        }
        $paymentStatusText = sprintf($this->t($paymentStatusText), $paymentDate);

        $localPaymentStatus = $source->getPaymentStatus();
        if ($localPaymentStatus !== $paymentStatus) {
            $paymentCompareStatus = $paymentStatus === API::PaymentStatus_Paid ? static::Status_Warning : static::Status_Info;
            $paymentCompareStatustext = $this->t('payment_status_not_equal');
            $this->setStatus($paymentCompareStatus, $paymentCompareStatustext);
        } else {
            $paymentCompareStatus = static::Status_Success;
        }

        $paymentStatusMarkup = sprintf('<span class="notice-%s">%s</span>', $this->getStatusClass($paymentCompareStatus), $paymentStatusText);
        $fields['payment_status'] = array(
            'type' => 'markup',
            'label' => $this->t('payment_status'),
            'value' => $paymentStatusMarkup,
        );
        if (!empty($paymentCompareStatustext)) {
            $fields['payment_status'] = array_merge_recursive($fields['payment_status'],
                array(
                    'attributes' => array(
                        'title' => $paymentCompareStatustext,
                    ),
                )
            );
        }

        if ($paymentStatus === API::PaymentStatus_Paid) {
            $fields['set_paid'] = array(
                'type' => 'button',
                'value' => $this->t('set_due'),
                'ajax' => array(
                    'service' => 'invoice_paymentstatus_set',
                    'parent_type' => $this->source->getType(),
                    'parent_source' => $this->source->getId(),
                    'type' => $source->getType(),
                    'source' => $source->getId(),
                    'value' => Api::PaymentStatus_Due,
                ),
            );
        } else {
            $fields['payment_date'] = array(
                'type' => 'date',
                'label' => $this->t('payment_date'),
                'attributes' => array(
                    'placeholder' => $this->t('date_format'),
                    'class' => 'acumulus-ajax-data',
                ),
                'default' => date(API::DateFormat_Iso),
            );
            $fields['set_paid'] = array(
                'type' => 'button',
                'value' => $this->t('set_paid'),
                'ajax' => array(
                    'service' => 'invoice_paymentstatus_set',
                    'parent_type' => $this->source->getType(),
                    'parent_source' => $this->source->getId(),
                    'type' => $source->getType(),
                    'source' => $source->getId(),
                    'value' => Api::PaymentStatus_Paid,
                ),
            );
        }

        return $fields;
    }
987874
@SuppressWarnings("nls")
    @Override
    public void entering(String sourceClass, String sourceMethod) {
        writeLog(Level.FINER, "ENTRY {0}.{1}", null, new Object[] {
            sourceClass, sourceMethod
        });
    }
612395
public function setTranslateEntry(TranslateEntry $translateEntry)
    {
        if (is_null($this->translateEntry)) {
            throw new ParserContextException('TranslateEntry should be generated through `generateTranslateEntry()` function first.');
        }
        $this->translateEntry = $translateEntry;

        return $this;
    }
773985
public void log(final LogEntry entry)
    {
        if (entry.getLevel().compareTo(this.level) < 0)
        {
            return;
        }
        if (!this.filters.isEmpty())
        {
            for (LogFilter filter : this.filters)
            {
                if (!filter.accept(entry))
                {
                    return;
                }
            }
        }
        this.publish(entry);
    }