This is Yii2 utilities

Overview

YII2-UTILITY

This is Yii2 utilities.

Requirements

  • PHP >= 7.4
  • Curl extension for PHP7 must be enabled.

Download

Using Composer

From your project directory, run:

composer require algolteam/library-yii2

or

php composer.phar require algolteam/library-yii2

Note: If you don't have Composer you can download it HERE.

Using release archives

https://github.com/algolteam/yii2-utility/releases

Using Git

From a project directory, run:

git clone https://github.com/algolteam/yii2-utility.git

Usage

<main.php>

<?= GridView::widget([
    'dataProvider' => $dataProvider,
    'columns' => [
        [
                'class' => ALGOL_YII::GridColumnExpandOf(),
                'attribute' => 'fTitle',
                'label' => 'Title',
                'onclick' => function ($data) {
                    $FResult = [];
                    if (isset($data['fUrl']) and !empty($data['fUrl'])) {
                        $FResult['value'] = '<i class="fa fa-youtube-play"></i> ' . $data['fTitle'];
                        $FResult['url'] = \yii\helpers\Url::toRoute('info');
                    } else {
                        $FResult['value'] = '<i class="fas fa-folder"></i> ' . $data['fTitle'];
                        $FResult['url'] = yii\helpers\Url::home();
                        $FResult['expand'] = false;
                    }
                    $FResult['data'] = ['id' => $data['ID'], 'hi' => [1, 2, 3]];
                    return $FResult;
                },
        ],
    ],
]) 
?>

<controller.php>

<?php
    public function actionInfo($id = null) {
        if (isset($id)) {
            $model = Tlink::findOne($id);
            if (isset($model)) return $this->renderAjax('info', ['model' => $model]);
        }
        return 'not found data...';
    }
?>

<view.info.php>

<?php
use yii\widgets\Pjax;
?>

<?php Pjax::begin([]);

$info = ALGOL::EmbedOf()->get($model->fUrl);

?>

    <div class="container-fluid">
        <div class="row">
            <div class="col-3">
                <img class="img-fluid img-responsive rounded shadow" src="<?= $info->image ?>">
            </div>
            <div class="col p-3">
                <div class="list-group list-group-horizontal pb-3 text-center">
                    <a href="<?= $info->authorUrl ?>" class="list-group-item list-group-item-action bg-opacity-75 bg-dark text-white">
                        <h5 class="mb-1"><i class="bi bi-play-btn"></i> Play</h5>
                    </a>
                    <a href="<?= $info->authorUrl ?>" class="list-group-item list-group-item-action bg-opacity-75 bg-dark text-white">
                        <h5 class="mb-1"><i class="bi bi-youtube"></i> YouTube</h5>
                    </a>
                    <a href="<?= $info->authorUrl ?>" class="list-group-item list-group-item-action bg-opacity-75 bg-dark text-white">
                        <h5 class="mb-1"><i class="bi bi-heart"></i> Favorite</h5>
                    </a>
                    <a href="<?= $info->authorUrl ?>" class="list-group-item list-group-item-action bg-opacity-75 bg-dark text-white">
                        <h5 class="mb-1"><i class="bi bi-stars"></i> List</h5>
                    </a>
                </div>
                <h5><?= $info->title ?></h5>
                <p class="text-justify"><?= ALGOL::StrOf()->Replace($info->description, [CH_NEW_LINE, CH_TRIM], [CH_FREE]) ?></p>
            </div>
        </div>
    </div>

<?php Pjax::end(); ?>

License

This open-source software is distributed under the BSD-3-Clause License. See LICENSE.md

Contributing

All kinds of contributions are welcome - code, tests, documentation, bug reports, new features, etc...

  • Send feedbacks.
  • Submit bug reports.
  • Write/Edit the documents.
  • Fix bugs or add new features.

Contact me

You can contact me via Telegram but if you have an issue please open one.

Support me

You can support me using via LiberaPay Donate using Liberapay

or buy me a beer or two using Paypal.

You might also like...
An enhanced FileInput widget for Bootstrap 4.x/3.x with file preview, multiple selection, and more features (sub repo split from yii2-widgets)
An enhanced FileInput widget for Bootstrap 4.x/3.x with file preview, multiple selection, and more features (sub repo split from yii2-widgets)

yii2-widget-fileinput The FileInput widget is a customized file input widget based on Krajee's Bootstrap FileInput JQuery Plugin. The widget enhances

An enhanced Yii 2 widget encapsulating the HTML 5 range input (sub repo split from yii2-widgets)
An enhanced Yii 2 widget encapsulating the HTML 5 range input (sub repo split from yii2-widgets)

yii2-widget-rangeinput The RangeInput widget is a customized range slider control widget based on HTML5 range input. The widget enhances the default H

A Yii2 module for embedding social plugins and widgets.
A Yii2 module for embedding social plugins and widgets.

yii2-social Module that enables access to social plugins for Yii Framework 2.0. It includes support for embedding plugins from the following networks

Pug Yii2 adapter

Yii 2 Pug (ex Jade) extension This extension provides a view renderer for Pug templates for Yii framework 2.0 applications. Support GutHub issues Inst

Alejandro Flores, Php Yii2 Emoac

Prueba Tecnica Emoac Proyecto basado en PHP con Yii2. Hecho por Alejandro Flores, Ingeniero en informática. Este proyecto consta de un CRUD de product

An extended bootstrap alert and alert block widget for Yii2 (sub repo split from yii2-widgets)
An extended bootstrap alert and alert block widget for Yii2 (sub repo split from yii2-widgets)

yii2-widget-alert This extension contains a couple of useful widgets. The Alert widget extends the \yii\bootstrap\Alert widget with more easy styling

Simple RBAC Manager for Yii2 (minify of yii2-admin)
Simple RBAC Manager for Yii2 (minify of yii2-admin)

Yii2 Mimin Simple RBAC Manager fo Yii 2.0. Minify of yii2-admin extension with awesome features Attention Before you install and use this extension, t

🎩✨🌈 OOP Proxy wrappers utilities - generates and manages proxies of your objects
🎩✨🌈 OOP Proxy wrappers utilities - generates and manages proxies of your objects

Proxy Manager This library aims to provide abstraction for generating various kinds of proxy classes. Documentation You can learn about the proxy patt

A set of utilities for working with vk api!

vk-utils Документация на русском языке Installation composer require labile/vk-utils How to use it? Simple example use Astaroth\VkUtils\Client; $api

⛽ Set of utilities to test Laravel applications powered by Octane.

⛽ Octane Testbench Set of utilities to test Laravel applications powered by Octane. Install Via Composer: composer require --dev cerbero/octane-testbe

Open-source library used in Gigadrive projects with common PHP utilities

PHP Commons This library provides PHP utilities used in Gigadrive projects, provided for the open-source community. Functions are registered globally

A URL shortener with various other utilities, backed by a custom lightweight framework.

da.gd What is da.gd? da.gd is both a URL shortener and a collection of quick-info tools written in PHP. It allows you to use curl (or any http client)

This is php utilities

PHP-UTILITY This is php utilities. Requirements PHP = 7.4 Curl extension for PHP7 must be enabled. Download Using Composer From your project director

Utilities for laravel project
Utilities for laravel project

Sloth Utilities This package gives your Laravel projects some utilities that you might need for production. It's so simple to use, once it's installed

The PasswordHasher component provides password hashing utilities.

PasswordHasher Component The PasswordHasher component provides secure password hashing utilities. Getting Started $ composer require symfony/password-

A collection of tools to help with PHP command line utilities

PHP Command Line Tools A collection of functions and classes to assist with command line development. Requirements PHP = 5.3 Suggested PHP extensions

Magento-bulk - Bulk Import/Export helper scripts and CLI utilities for Magento Commerce

Magento Bulk Bulk operations for Magento. Configuration Copy config.php.sample to config.php and edit it. Product Attribute Management List All Attrib

General utilities for the plugin, not dependent on WordPress

Plugin Utils General utilities for the plugin, not dependent on WordPress Install Via Composer composer require graphql-api/plugin-utils Development T

PSR-15 middleware with various cache utilities

middlewares/cache Middleware components with the following cache utilities: CachePrevention Expires Cache Requirements PHP = 7.2 A PSR-7 http library

Owner
IT TEAMWORK
null
Simple RBAC Manager for Yii2 (minify of yii2-admin)

Yii2 Mimin Simple RBAC Manager fo Yii 2.0. Minify of yii2-admin extension with awesome features Attention Before you install and use this extension, t

Hafid Mukhlasin 52 Sep 22, 2022
Tarantool connector for yii2 framework. Allow to use activerecord, schemas, widgets and more.

Tarantool connector for yii2 framework Tarantool connector for yii2 framework. Allow to use framework abstractions such as ActiveRecord, Schema, Table

Andrey 11 Nov 21, 2021
Web Push Notifications brought to Yii2

Web Push Notifications for Yii 2 An extension for implementing Web Push Notifications on your website in a breeze. Documentation is at docs/README.md

Mehdi Achour 12 May 19, 2022
yii2-app-advanced with Twitter Bootstrap 5

Yii 2 Advanced Project Template is a skeleton Yii 2 application best for developing complex Web applications with multiple tiers.

Nedarta 1 Nov 5, 2021
Prometheus exporter for Yii2

yii2-prometheus Prometheus Extension for Yii 2 This extension provides a Prometheus exporter component for Yii framework 2.0 applications. This extens

Mehdi Achour 3 Oct 27, 2021
Yii2-symfonymailer - Yii 2 Symfony mailer extension.

Yii Mailer Library - Symfony Mailer Extension This extension provides a Symfony Mailer mail solution for Yii framework 2.0. For license information ch

Yii Software 28 Dec 22, 2022
Yii2 console application used to write our processors of methods to responsible to client calling.

Microservice Application Skeleton Yii2 console application used to write our processors of methods to responsible to client calling. This application

Jafaripur 0 Mar 10, 2022
Date/Time Picker widget for Yii2 framework Based on Eonasdan's Bootstrap 3 Date/Time Picker

Yii2 Date/Time Picker Widget Date/Time Picker widget for Yii2 framework Based on Eonasdan's Bootstrap 3 Date/Time Picker Demo Since this is a part of

Yevhen Terentiev 8 Mar 14, 2022
Yii2 extension for format inputs based on AutoNumeric.js

Yii2 extension for format inputs based on AutoNumeric.js

extead 2 Oct 7, 2019
Yii2 SwitchInput widget turns checkboxes and radio buttons into toggle switchinputes

Yii2 SwitchInput widget turns checkboxes and radio buttons into toggle switchinputes

Kartik Visweswaran 38 Sep 21, 2022