Initial import of space_profiles module

This commit is contained in:
Kelin Rescue Hub
2026-04-04 13:11:50 -04:00
commit 87a59e5a0a
35 changed files with 1627 additions and 0 deletions

33
models/SpaceProfile.php Normal file
View File

@@ -0,0 +1,33 @@
<?php
namespace humhub\modules\space_profiles\models;
use humhub\components\ActiveRecord;
use humhub\modules\space_profiles\components\TemplateRegistry;
class SpaceProfile extends ActiveRecord
{
public static function tableName()
{
return 'rescue_space_profile';
}
public function rules()
{
return [
[['contentcontainer_id', 'rescue_name', 'address', 'city', 'state', 'zip', 'email', 'phone', 'animals_we_accept', 'description', 'mission_statement', 'template_key', 'slug'], 'required'],
[['contentcontainer_id'], 'integer'],
[['animals_we_accept', 'description', 'mission_statement', 'header_html', 'body_html', 'footer_html'], 'string'],
[['template_key'], 'in', 'range' => array_keys(TemplateRegistry::options())],
[['rescue_name', 'email', 'slug'], 'string', 'max' => 190],
[['address', 'icon_path', 'background_image_path'], 'string', 'max' => 255],
[['template_key'], 'string', 'max' => 64],
[['city'], 'string', 'max' => 120],
[['state'], 'string', 'max' => 2],
[['zip'], 'string', 'max' => 10],
[['phone'], 'string', 'max' => 32],
[['contentcontainer_id'], 'unique'],
[['slug'], 'unique'],
];
}
}