Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Y
yii2-secure-vault-widgets
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dmstr
yii2-secure-vault-widgets
Commits
7b7c09e2
Commit
7b7c09e2
authored
May 06, 2024
by
Elias Luhr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow hide archived visually
parent
c8a9d768
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
4 deletions
+13
-4
PrepareItems.php
src/traits/PrepareItems.php
+6
-2
SecureVaultList.php
src/widgets/SecureVaultList.php
+6
-1
SecureVaultSchemaInput.php
src/widgets/SecureVaultSchemaInput.php
+1
-1
No files found.
src/traits/PrepareItems.php
View file @
7b7c09e2
...
...
@@ -37,11 +37,15 @@ trait PrepareItems
*/
protected
$itemList
=
[];
protected
function
prepareItemList
()
:
void
protected
function
prepareItemList
(
$skipArchived
=
false
)
:
void
{
$secureVaultItems
=
\Yii
::
$app
->
secureVault
->
listItems
(
$this
->
schemaUuid
,
$this
->
userUuid
);
foreach
(
$secureVaultItems
as
$secureVaultItem
)
{
if
(
$skipArchived
&&
isset
(
$secureVaultItem
[
'isArchived'
])
&&
$secureVaultItem
[
'isArchived'
])
{
continue
;
}
$this
->
itemList
[
$secureVaultItem
[
'uuid'
]]
=
json_encode
(
$secureVaultItem
[
'dataJson'
]);
}
}
}
\ No newline at end of file
}
src/widgets/SecureVaultList.php
View file @
7b7c09e2
...
...
@@ -63,6 +63,11 @@ class SecureVaultList extends Widget
*/
public
$archiveActionId
=
'secure-vault-archive'
;
/**
* @var bool
*/
public
$hideArchived
=
false
;
/**
* @var array
*/
...
...
@@ -72,7 +77,7 @@ class SecureVaultList extends Widget
{
parent
::
init
();
$this
->
prepareItemList
();
$this
->
prepareItemList
(
$this
->
hideArchived
);
}
public
function
run
()
...
...
src/widgets/SecureVaultSchemaInput.php
View file @
7b7c09e2
...
...
@@ -100,4 +100,4 @@ class SecureVaultSchemaInput extends InputWidget
}
}
}
}
\ No newline at end of file
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment