mirror of
https://github.com/appwrite/appwrite
synced 2026-05-06 06:48:22 +00:00
Merge pull request #8483 from appwrite/fix-template-variable
Add value to variables template
This commit is contained in:
commit
f20851e8f7
3 changed files with 38 additions and 35 deletions
|
|
@ -110,8 +110,7 @@ class TemplateFunction extends Model
|
|||
'default' => [],
|
||||
'example' => [],
|
||||
'array' => true
|
||||
])
|
||||
;
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -33,8 +33,7 @@ class TemplateRuntime extends Model
|
|||
'description' => 'Path to function in VCS (Version Control System) repository',
|
||||
'default' => '',
|
||||
'example' => 'node/starter',
|
||||
])
|
||||
;
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -10,37 +10,42 @@ class TemplateVariable extends Model
|
|||
public function __construct()
|
||||
{
|
||||
$this
|
||||
->addRule('name', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Variable Name.',
|
||||
'default' => '',
|
||||
'example' => 'APPWRITE_DATABASE_ID',
|
||||
])
|
||||
->addRule('description', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Variable Description.',
|
||||
'default' => '',
|
||||
'example' => 'The ID of the Appwrite database that contains the collection to sync.',
|
||||
])
|
||||
->addRule('placeholder', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Variable Placeholder.',
|
||||
'default' => '',
|
||||
'example' => '64a55...7b912',
|
||||
])
|
||||
->addRule('required', [
|
||||
'type' => self::TYPE_BOOLEAN,
|
||||
'description' => 'Is the variable required?',
|
||||
'default' => false,
|
||||
'example' => false,
|
||||
])
|
||||
->addRule('type', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Variable Type.',
|
||||
'default' => '',
|
||||
'example' => 'password',
|
||||
])
|
||||
;
|
||||
->addRule('name', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Variable Name.',
|
||||
'default' => '',
|
||||
'example' => 'APPWRITE_DATABASE_ID',
|
||||
])
|
||||
->addRule('description', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Variable Description.',
|
||||
'default' => '',
|
||||
'example' => 'The ID of the Appwrite database that contains the collection to sync.',
|
||||
])
|
||||
->addRule('value', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Variable Value.',
|
||||
'default' => '',
|
||||
'example' => '512',
|
||||
])
|
||||
->addRule('placeholder', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Variable Placeholder.',
|
||||
'default' => '',
|
||||
'example' => '64a55...7b912',
|
||||
])
|
||||
->addRule('required', [
|
||||
'type' => self::TYPE_BOOLEAN,
|
||||
'description' => 'Is the variable required?',
|
||||
'default' => false,
|
||||
'example' => false,
|
||||
])
|
||||
->addRule('type', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Variable Type.',
|
||||
'default' => '',
|
||||
'example' => 'password',
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue