<commit_before><?php

/**
 * Yii2 FancyBox Extension 
 * @author <NAME> <<EMAIL>>
 * @license MIT
 */

namespace bigpaulie\fancybox;

use yii\helpers\Html;
use yii\web\View;
use bigpaulie\fancybox\FancyBoxAsset;
use bigpaulie\fancybox\Widget;

class FancyBox extends Widget {

    public function run() {
        if ($this->type == "image") {
            // create anchor tag & image tag
            $class = $this->htmlOptions['linkOptions']['class'];
            $this->htmlOptions['linkOptions']['class'] = 'fancybox.image ' . $class;
            echo Html::a(Html::img($this->item['src'], $this->htmlOptions['imageOptions']), $this->item['href'], $this->htmlOptions['linkOptions']);
        } elseif ($this->type == "inline") {
            $class = $this->htmlOptions['linkOptions']['class'];
            $this->htmlOptions['linkOptions']['class'] = 'fancybox.inline ' . $class;
            echo Html::a($this->item['text'], $this->item['href'], $this->htmlOptions['linkOptions']);
        } elseif ($this->type == "iframe") {
            /**
             * Add class iframe to the link 
             */
            $class = $this->htmlOptions['linkOptions']['class'];
            $this->htmlOptions['linkOptions']['class'] = 'fancybox.iframe ' . $class;

            echo Html::a($this->item['text'], $this->item['href'], $this->htmlOptions['linkOptions']);
        } elseif ($this->type == "ajax") {
            $class = $this->htmlOptions['linkOptions']['class'];
            $this->htmlOptions['linkOptions']['class'] = 'fancybox.ajax ' . $class;

            echo Html::a($this->item['text'], $this->item['href'], $this->htmlOptions['linkOptions']);
        } elseif ($this->type == "media") {
            $class = $this->htmlOptions['linkOptions']['class'];
            $this->htmlOptions['linkOptions']['class'] = 'fancybox.media ' . $class;

            echo Html::a($this->item['text'], $this->item['href'], $this->htmlOptions['linkOptions']);
        }
    }

}<commit_msg>Changing media type css class <commit_after><?php

/**
 * Yii2 FancyBox Extension 
 * @author <NAME> <<EMAIL>>
 * @license MIT
 */

namespace bigpaulie\fancybox;

use yii\helpers\Html;
use yii\web\View;
use bigpaulie\fancybox\FancyBoxAsset;
use bigpaulie\fancybox\Widget;

class FancyBox extends Widget {

    public function run() {
        if ($this->type == "image") {
            // create anchor tag & image tag
            $class = $this->htmlOptions['linkOptions']['class'];
            $this->htmlOptions['linkOptions']['class'] = 'fancybox.image ' . $class;
            echo Html::a(Html::img($this->item['src'], $this->htmlOptions['imageOptions']), $this->item['href'], $this->htmlOptions['linkOptions']);
        } elseif ($this->type == "inline") {
            $class = $this->htmlOptions['linkOptions']['class'];
            $this->htmlOptions['linkOptions']['class'] = 'fancybox.inline ' . $class;
            echo Html::a($this->item['text'], $this->item['href'], $this->htmlOptions['linkOptions']);
        } elseif ($this->type == "iframe") {
            /**
             * Add class iframe to the link 
             */
            $class = $this->htmlOptions['linkOptions']['class'];
            $this->htmlOptions['linkOptions']['class'] = 'fancybox.iframe ' . $class;

            echo Html::a($this->item['text'], $this->item['href'], $this->htmlOptions['linkOptions']);
        } elseif ($this->type == "ajax") {
            $class = $this->htmlOptions['linkOptions']['class'];
            $this->htmlOptions['linkOptions']['class'] = 'fancybox.ajax ' . $class;

            echo Html::a($this->item['text'], $this->item['href'], $this->htmlOptions['linkOptions']);
        } elseif ($this->type == "media") {
            $class = $this->htmlOptions['linkOptions']['class'];
            $this->htmlOptions['linkOptions']['class'] = 'fancybox-media ' . $class;

            echo Html::a($this->item['text'], $this->item['href'], $this->htmlOptions['linkOptions']);
        }
    }

}
{'fraction_non_alphanumeric': 0.20897018291155098, 'fraction_numerical': 0.0005011275369581559, 'mean_word_length': 2.9446640316205532, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 71, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '607458', 'n_tokens_mistral': 1188, 'n_tokens_neox': 1182, 'n_words': 201}