Results

11.04.2024
link_obfuscation 1.0.0-beta3 :: src/Service/ObfuscateLinkService.php
use Drupal\Core\Url;
use Drupal\language\Entity\ConfigurableLanguage;
use Masterminds\HTML5;

/**
 * Provides a class which generates a link with route names and parameters.
 */
class ObfuscateLinkService {
09.10.2020
media_migration 8.x-1.x-dev :: src/Plugin/migrate/process/CKEditorLinkFileToLinkitFilter.php
use Drupal\migrate\ProcessPluginBase;
use Drupal\migrate\Row;
use Masterminds\HTML5;
use Masterminds\HTML5\Parser\StringInputStream;
use Symfony\Component\DependencyInjection\ContainerInterface;

/**
 * Transforms <a href="/file/%"> tags to <a data-entity-substitution="media" …>.
 *
 * @MigrateProcessPlugin(
09.10.2020
media_migration 8.x-1.x-dev :: src/Plugin/migrate/process/ImgTagToEmbedFilter.php
use Drupal\migrate\Plugin\MigrationInterface;
use Drupal\migrate\Row;
use Masterminds\HTML5;
use Masterminds\HTML5\Parser\StringInputStream;
use Symfony\Component\DependencyInjection\ContainerInterface;

/**
 * Transforms <img src="/files/cat.png"> tags to <drupal-media …>.
 *
 * @MigrateProcessPlugin(
09.10.2020
media_migration 8.x-1.x-dev :: tests/src/Traits/MediaMigrationAssertionsForNonMediaSourceTrait.php
use Drupal\media_migration\MediaMigration;
use Drupal\node\NodeInterface;
use Masterminds\HTML5;
use Masterminds\HTML5\Parser\StringInputStream;

/**
 * Trait for non-media source to media migration tests.
 */
trait MediaMigrationAssertionsForNonMediaSourceTrait {
29.06.2020
migrate_plus 8.x-5.x-dev :: src/Plugin/migrate/process/Dom.php
use Drupal\migrate\ProcessPluginBase;
use Drupal\migrate\Row;
use Masterminds\HTML5;

/**
 * Handles string to DOM and back conversions.
 *
 * Available configuration keys:
 * - method: Action to perform. Possible values:
06.09.2020
migrate_source_html 1.0.0 :: src/Plugin/migrate_plus/data_parser/Html.php
   *
   * By making this a protected class, can be easily extended with different
   * wrappers/parsers like \Masterminds\HTML5.
   *
   * @param string $html
   *   The HTML to be processed. A full html page is expected.
   *
   * @return \DOMDocument
   *   The DOMDocument for provided HTML.
06.09.2020
migrate_source_html 1.0.0 :: src/Plugin/migrate_plus/data_parser/Html5.php
namespace Drupal\migrate_source_html\Plugin\migrate_plus\data_parser;

use Masterminds\HTML5 as Html5Parser;

/**
 * Obtain Html5 data for migration.
 *
 * @DataParser(
 *   id = "html5",
22.06.2024
more_fields 2.2.19 :: src/Truncator.php
        // Parse using HTML5Lib if it's available.
        if (class_exists('Masterminds\HTML5')) {
            try {
                $html5 = new \Masterminds\HTML5();
                $doc = $html5->loadHTML($html);
                $root_node = $doc->documentElement->lastChild;
            } catch (\Exception $e) {;
            }
        }
04.06.2024
storybook 1.x-dev :: src/EventSubscriber/AlterBodySubscriber.php
use Drupal\storybook\Util;
use Masterminds\HTML5;
use Symfony\Component\DomCrawler\Crawler;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Event\ResponseEvent;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Symfony\Component\HttpKernel\KernelEvents;
17.01.2019
tmgmt_xtm 8.x-5.x-dev :: src/Plugin/tmgmt/Translator/Connector.php
use Drupal\tmgmt\Entity\Translator;
use GuzzleHttp\Utils;
use Masterminds\HTML5\Exception;
use RuntimeException;
use SimpleXMLElement;

/**
 * Provides XTM API functionalities.
 *
   * @throws \Drupal\tmgmt_xtm\Exception\TMGMTXtmException
   *   Thrown when there is an issue with downloading or processing the file.
   * @throws \Masterminds\HTML5\Exception|\Drupal\tmgmt\TMGMTException
   *   Thrown when there is an issue parsing the XML file.
   */
  private function populateJobs(Job $job, $file) {
    $tempFile = FileHelper::getTemp($file);
    if (file_exists($tempFile)) {
      unlink($tempFile);
   * @throws \Drupal\tmgmt_xtm\Exception\TMGMTXtmException
   *   Thrown when there is an issue with downloading or processing the file.
   * @throws \Masterminds\HTML5\Exception|\Drupal\tmgmt\TMGMTException
   *   Thrown when there is an issue parsing the XML file.
   */
  private function populateJobItem(Job $job, JobItem $jobItem, $file) {
    $tempFile = FileHelper::getTemp($file);
    if (file_exists($tempFile)) {
      unlink($tempFile);
17.01.2019
tmgmt_xtm 8.x-5.x-dev :: src/Plugin/tmgmt/Translator/XmlFilesProvider.php
namespace Drupal\tmgmt_xtm\Plugin\tmgmt\Translator;

use Masterminds\HTML5\Exception;

/**
 * Class XmlFilesProvider.
 *
 * Provides XML files from the obtained XTM file.
 *
   *   An array of SimpleXMLElement objects representing the XML files.
   *
   * @throws \Masterminds\HTML5\Exception
   *   Throws an exception if the XTM file cannot be read from the ZIP archive.
   */
  public function getXmlFiles() {
    $this->unpack();
    $xmls = $this->loadXmls();
    $this->removeFolder();
   *   An array of SimpleXMLElement objects.
   *
   * @throws \Masterminds\HTML5\Exception
   *   Throws an exception if no XML data is found.
   */
  private function loadXmls() {
    $xmls = [];
    foreach ($this->findPaths() as $globFilePath) {
      $xml = simplexml_load_string(file_get_contents($globFilePath), NULL, LIBXML_NOCDATA);
17.01.2019
tmgmt_xtm 8.x-5.x-dev :: src/Plugin/tmgmt/Translator/Cart.php
use Drupal\tmgmt\Entity\JobItem;
use Drupal\tmgmt\Entity\Translator;
use Masterminds\HTML5\Exception;

/**
 * Provides operations for managing translation jobs.
 *
 * @package Drupal\tmgmt_xtm\Plugin\tmgmt\Translator
 */
19.01.2021
youtubeapi 8.x-1.2 :: src/YoutubeAPI/API.php
   * @return array
   *
   * @throws \Masterminds\HTML5\Exception
   */
  public function execute() {

    // Build URL.
    $url = $this->getUrl();
   * @return Array .
   *
   * @throws \Masterminds\HTML5\Exception
   */
  protected function getConfig() {

    $path = drupal_get_path('module', 'youtubeapi');
    $file_path = $path . "/config/api/" . $this->getMethod() . ".yml";
    $file_data = file_get_contents($file_path);
19.01.2021
youtubeapi 8.x-1.2 :: src/YoutubeAPI/APIInterface.php
   *   All available Parameters.
   *
   * @throws \Masterminds\HTML5\Exception
   */
  public function getParameters();

  /**
   * Returns all Mandatory Parameters.
   *

Pages

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc