Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate list and detail pages when creating publication types #776

Merged
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
f756b3c
Replace multiple containment assertions with single assertSame
caendesilva Dec 26, 2022
595de4c
Convert string literal to NOWDOC
caendesilva Dec 26, 2022
1c18cd7
Update testing name for consistency and increased coverage
caendesilva Dec 26, 2022
dd96401
Inline variable
caendesilva Dec 26, 2022
da62416
Formatting
caendesilva Dec 26, 2022
558e424
Move filesystem cleanup to teardown method
caendesilva Dec 26, 2022
24a8e83
Split comma-separated values into multiple lines
caendesilva Dec 26, 2022
fb8dfe3
Deprecate output property
caendesilva Dec 26, 2022
d637d6e
Move output writing to command
caendesilva Dec 26, 2022
2b57a73
Remove deprecated output property from action class
caendesilva Dec 26, 2022
fafc8f7
Apply fixes from StyleCI
StyleCIBot Dec 26, 2022
5a56014
Set default value of nullable arguments to null
caendesilva Dec 26, 2022
f22e66c
Test create method with default parameters
caendesilva Dec 26, 2022
908bebe
Set values to opposite of default for increased test coverage
caendesilva Dec 26, 2022
9616af6
Expand protected property name abbreviation
caendesilva Dec 26, 2022
5fb162e
Import used function
caendesilva Dec 26, 2022
ac002bd
Remove extra newlines
caendesilva Dec 26, 2022
e1d4812
Apply fixes from StyleCI
StyleCIBot Dec 26, 2022
8a22c2d
Extract methods
caendesilva Dec 27, 2022
0b62dd6
Create methods stubs
caendesilva Dec 27, 2022
41bb202
Implement base createDetailTemplate() method
caendesilva Dec 27, 2022
63d0300
Implement base createListTemplate() method
caendesilva Dec 27, 2022
aaa6fd0
Extract method
caendesilva Dec 27, 2022
a7214eb
Add newline via helper method
caendesilva Dec 27, 2022
8f080a5
Apply fixes from StyleCI
StyleCIBot Dec 27, 2022
9d1dbf4
Extract method for the Blade stub
caendesilva Dec 27, 2022
0f69e5f
Create parameter to define the slot contents
caendesilva Dec 27, 2022
3ae0979
Create basic list page
caendesilva Dec 27, 2022
177f865
Create basic detail page
caendesilva Dec 27, 2022
a054549
Split out articles
caendesilva Dec 27, 2022
6877893
Display data in foreach loop instead of pre
caendesilva Dec 27, 2022
8ed34e0
Implode arrays
caendesilva Dec 27, 2022
72f4d29
Signify arrays
caendesilva Dec 27, 2022
7e67fa4
Refactor to use a description list
caendesilva Dec 27, 2022
22e8c18
Decrease heading level
caendesilva Dec 27, 2022
d8a59ec
Adjust spacing
caendesilva Dec 27, 2022
059f989
Add type annotations
caendesilva Dec 27, 2022
e9898d0
Revert "Extract method for the Blade stub"
caendesilva Dec 27, 2022
c0a7825
Add newline after variable
caendesilva Dec 27, 2022
0ebf55f
Revert "Add newline after variable"
caendesilva Dec 27, 2022
f52f62b
Normalize indentation and spacing
caendesilva Dec 27, 2022
154b785
Test it creates the list and detail pages
caendesilva Dec 27, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Extract method
caendesilva committed Dec 27, 2022
commit aaa6fd05fb41401ebf14b2e8b71033dba44c1e9a
Original file line number Diff line number Diff line change
@@ -81,7 +81,7 @@ protected function createDetailTemplate(): void

BLADE;

file_put_contents(Hyde::path("$this->directoryName/{$this->detailTemplateName()}.blade.php"), $contents);
$this->savePublicationFile("{$this->detailTemplateName()}.blade.php", $contents);
}

protected function createListTemplate(): void
@@ -98,6 +98,11 @@ protected function createListTemplate(): void

BLADE;

file_put_contents(Hyde::path("$this->directoryName/{$this->listTemplateName()}.blade.php"), $contents);
$this->savePublicationFile("{$this->listTemplateName()}.blade.php", $contents);
}

protected function savePublicationFile(string $filename, string $contents): int
{
return file_put_contents(Hyde::path("$this->directoryName/$filename"), $contents);
}
}