Download the PHP package aspott/ytk without Composer

On this page you can find all versions of the php package aspott/ytk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package ytk

YTK - Yii Toolkit

Version 1.1.4, September, 24th, 2023

                  ___           ,-.  
        ,---,   ,--.'|_     ,--/-/|  
       /_ ./|   |--| :,'  ,--. :/ |  
 ,---, |--' :   :--: ' :  :--: ' /   
/___/ \.--: | .;__,'  /   |--'  /    
 .--\  \ ,' ' |--|   |    '--|  :    
  \--;  `  ,' :__,'| :    |--|   \   
   \--\    '    '--: |__  '--: |. \  
    '--\   |    |--| '.'| |--| ' \ \ 
     \--;  ;    ;--:    ; '--: |--'  
      :--\  \   |--,   /  ;--|,'     
       \--' ;    ---`-'   '--'       
        `--`  Y i i  T o o l k i t 

Copyright (c) 2013-2023 Andreas Pott

About

YTK is a collection of functions and widgets for the php web framework Yii (version 1.11). The toolkit is designed to to be used along with the bootstrap extension for Yii.

Install

Copy this project to the extensions folder of the yii projects under protected\extensions\ytk

Install using composer

ytk can be installed using composer from packagist as "require": "aspott/ytk"

Configure

To use the widgets from ytk, register ytk for autoloading in the file protected\config\main.php with the following code snippet (after manuall install)

// autoloading model and component classes
'import'=>array(
    'application.models.*',
    'application.components.*',
    'application.extensions.ytk.*',     // <-- add this entry
),

If composer was used, the alias must be changes. Using a file alias of Ytk with (to be defined in yii's config.php on top of the statement returning the configuration array)

Yii::setPathOfAlias('ytk', dirname(__FILE__).'/../extensions/vendor/aspott/ytk');

require 'protected/extensions/vendor/autoload.php';

The last line calls the autoload script from composer which is likely to be required by other composer loaded extensions as well. Using the setPathOfAlias, one can shorten references to ytk components from application.extensions.ytk.ytk to ytk.Ytk. Make sure that the latter Ytk starts with a capital letter if you are running Linux (as filename are case sensitive). So aliasing with composer shortens the import array as follows

'import'=>array(
    'application.models.*',
    // ...
    'ytk.*',                            // <-- see the shortend syntax thanks to aliasing
),

To use Ytk's markdown renderer as a view, add the following entry to the config file config/main.php under the section components

// application components
'components'=>array(
    // [...] some components

    // renderer component for markdown pages simiar to the views/site/page rendering
    'viewRenderer' => array(
        'class'=>'YtkMdViewRenderer',
    ),
    // [...] some more components
),

To use the javascript components/assets in the package, add the ytk component to the main configuration file under components

'ytk'=>array(
    'class'=>'application.extensions.ytk.Ytk',
),

Also, here this is reducted to 'ytk.Ytk' when using the aliasing.

Additionally, the ytk component (with asset management must be initialized in protected/views/layout/main.php directly after <body> (and if it is used right after the respective init call for the bootstrap components) with

Usage of components

The provided widgets (here ytktile) of the package can be used as follows:

$this->widget('application.extensions.ytk.YtkTile', array(
    'header'=>'Min Example',
    'labels'=>array('X'=>'primary'),
    'body'=>'Some content',
));

With aliasing, also the name of the widgets is reduced to 'ytk.YtkTile'.

Functions from the namespace Ytk can be simply called by prefixing it with Ytk::

echo Ytk::EncodeSuccess('myLabel');

Prior to using java script extensions (such as chart.js), add the following line in each view file

Yii::app()->ytk->register('chartjs');

Acknowledgement

Ytk is shipped with a collection of php and javascript libraries under either MIT or LGPL license. As these libraries are exposed in the asset directory of the web projects, all thrid party code is fully available in source code.

License

The YTK is licensed under MIT license, a weak copyleft open source license.


All versions of ytk with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package aspott/ytk contains the following files

Loading the files please wait ....