Something went wrong. Try again.
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970<?php/** * Splashing Images plugin for Craft CMS 3.x * * unsplash.com integration for Craft 3 * * @link https://studioespresso.co * @copyright Copyright (c) 2017 Studio Espresso */
namespace studioespresso\splashingimages\models;
use Craft;
use craft\base\Model;use studioespresso\splashingimages\SplashingImages;
/** * SplashingImages Settings Model * * This is a model used to define the plugin's settings. * * Models are containers for data. Just about every time information is passed * between services, controllers, and templates in Craft, it’s passed via a model. * * https://craftcms.com/docs/plugins/models * * @author Studio Espresso * @package SplashingImages * @since 1.0.0 */class Settings extends Model{ // Public Properties // =========================================================================
/** * Some field model attribute * * @var string */ public $destination = '';
public string $folder = '';
public string $pluginLabel = "Unsplash";
// Public Methods // =========================================================================
/** * Returns the validation rules for attributes. * * Validation rules are used by [[validate()]] to check if attribute values are valid. * Child classes may override this method to declare different validation rules. * * More info: http://www.yiiframework.com/doc-2.0/guide-input-validation.html * * @return array */ public function rules(): array { return [ ['destination', 'required'], ['destination', 'string'], ['destination', 'default', 'value' => ''], ]; }}