PHPackages                             sjaakp/yii2-illustrated-behavior - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. sjaakp/yii2-illustrated-behavior

ActiveYii2-extension[File &amp; Storage](/categories/file-storage)

sjaakp/yii2-illustrated-behavior
================================

ActiveRecord Behavior with associated Widget for Yii2.

v2.0.1(1y ago)423.1k16[7 issues](https://github.com/sjaakp/yii2-illustrated-behavior/issues)[1 PRs](https://github.com/sjaakp/yii2-illustrated-behavior/pulls)MITPHPPHP &gt;=8.1

Since Nov 19Pushed 1y ago9 watchersCompare

[ Source](https://github.com/sjaakp/yii2-illustrated-behavior)[ Packagist](https://packagist.org/packages/sjaakp/yii2-illustrated-behavior)[ RSS](/packages/sjaakp-yii2-illustrated-behavior/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (9)Dependencies (1)Versions (10)Used By (0)

Illustrated 2.0
===============

[](#illustrated-20)

Behavior for Yii2 ActiveRecord
------------------------------

[](#behavior-for-yii2-activerecord)

### With associated Cropper-widget

[](#with-associated-cropper-widget)

[![Latest Stable Version](https://camo.githubusercontent.com/c6a31a1bc6b3d9898c090591cde90d3f9794a86428e186af2bd0a653f5f46647/68747470733a2f2f706f7365722e707567782e6f72672f736a61616b702f796969322d696c6c75737472617465642d6265686176696f722f762f737461626c65)](https://packagist.org/packages/sjaakp/yii2-illustrated-behavior)[![Total Downloads](https://camo.githubusercontent.com/e4c20a0b4db336f09ef1fe5477a047addcd8a6fbe43561e5eb393c6acd513759/68747470733a2f2f706f7365722e707567782e6f72672f736a61616b702f796969322d696c6c75737472617465642d6265686176696f722f646f776e6c6f616473)](https://packagist.org/packages/sjaakp/yii2-illustrated-behavior)[![License](https://camo.githubusercontent.com/31f52f8cabdcdb92ff840a06054b2df6d10186e8a987f5a87b50800ab2f5c84d/68747470733a2f2f706f7365722e707567782e6f72672f736a61616b702f796969322d696c6c75737472617465642d6265686176696f722f6c6963656e7365)](https://packagist.org/packages/sjaakp/yii2-illustrated-behavior)

**Illustrated 2.0** is a Behavior for the [Yii2 framework](http://www.yiiframework.com/) that makes any [ActiveRecord](http://www.yiiframework.com/doc-2.0/yii-db-activerecord.html "Yii API"), well, *illustrated*. It links the ActiveRecord to one or more image files. The images have strict proportions, allowing for a clean layout of views and other pages. The images may be saved in several resolutions.

The **Illustrated 2.0** behavior co-operates with the enclosed **CropperWidget** widget. This lets the user crop the image, before uploading it to the server.

[Here](http://sjaakpriester.nl/software/illustrated) is a demo of the **Illustrated 2.0** behavior and its associated **CropperWidget**.

**Note that the current version (2.0.0) is changed considerably from previous versions.** It should be far easier to use. Please consult this document carefully.

---

Installation
------------

[](#installation)

Install **Illustrated 2.0** with [Composer](https://getcomposer.org/). Either add the following to the require section of your `composer.json` file:

```
"sjaakp/yii2-illustrated-behavior": "*"

```

Or run:

```
composer require sjaakp/yii2-illustrated-behavior "*"

```

You can manually install **Illustrated 2.0**by [downloading the source in ZIP-format](https://github.com/sjaakp/yii2-illustrated-behavior/archive/master.zip).

**Note** that **Illustrated 2.0** needs PHP version 8.1 or later.

---

Usage of Illustrated
--------------------

[](#usage-of-illustrated)

**Illustrated 2.0** is used like any [Behavior](http://www.yiiframework.com/doc-2.0/yii-base-behavior.html "Yii API") of an ActiveRecord. The code should look something like this:

```
