doCount example

trait ConstraintTraitForV9
{
    use ConstraintLogicTrait;

    public function evaluate($other, string $description = '', bool $returnResult = false): ?bool
    {
        return $this->doEvaluate($other$description$returnResult);
    }

    public function count(): int
    {
        return $this->doCount();
    }

    public function toString(): string
    {
        return $this->doToString();
    }

    protected function additionalFailureDescription($other): string
    {
        return $this->doAdditionalFailureDescription($other);
    }

    
/** * @return bool|null */
    public function evaluate($other$description = '', $returnResult = false)
    {
        return $this->doEvaluate($other$description$returnResult);
    }

    public function count(): int
    {
        return $this->doCount();
    }

    public function toString(): string
    {
        return $this->doToString();
    }

    protected function additionalFailureDescription($other): string
    {
        return $this->doAdditionalFailureDescription($other);
    }

    
return MigrateSourceInterface::NOT_COUNTABLE;
    }

    // Return the cached count if we are caching counts and a refresh is not     // requested.     if ($this->cacheCounts && !$refresh) {
      $cache_object = $this->getCache()->get($this->cacheKey, 'cache');
      if (is_object($cache_object)) {
        return $cache_object->data;
      }
    }
    $count = $this->doCount();
    // Update the cache if we are caching counts.     if ($this->cacheCounts) {
      $this->getCache()->set($this->cacheKey, $count);
    }
    return $count;
  }

  /** * Gets the cache object. * * @return \Drupal\Core\Cache\CacheBackendInterface * The cache object. */
/** * @return bool|null */
    public function evaluate($other$description = '', $returnResult = false)
    {
        return $this->doEvaluate($other$description$returnResult);
    }

    public function count(): int
    {
        return $this->doCount();
    }

    public function toString(): string
    {
        return $this->doToString();
    }

    protected function additionalFailureDescription($other): string
    {
        return $this->doAdditionalFailureDescription($other);
    }

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