-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NEW LinkFieldController to handle FormSchema
- Loading branch information
1 parent
f0a3b25
commit 175a579
Showing
16 changed files
with
1,606 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,5 +5,4 @@ | |
|
||
// Avoid creating global variables | ||
call_user_func(function () { | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# This was copied from Elemental models.yml so has some extra stuff commented out | ||
SilverStripe\LinkField\Models\Link: | ||
# fields: | ||
# id: true | ||
# lastEdited: true | ||
# absoluteLink: String | ||
# title: true | ||
# showTitle: true | ||
# sort: true | ||
# blockSchema: ObjectType | ||
# obsoleteClassName: String | ||
# isPublished: Boolean | ||
# isLiveVersion: Boolean | ||
# canCreate: Boolean | ||
# canPublish: Boolean | ||
# canUnpublish: Boolean | ||
# canDelete: Boolean | ||
operations: | ||
# copyToStage: true | ||
# readOne: true | ||
delete: true | ||
# publish: true | ||
# unpublish: true |
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* eslint-disable */ | ||
import { graphqlTemplates } from 'lib/Injector'; | ||
|
||
const apolloConfig = { | ||
props( | ||
props | ||
) { | ||
const { | ||
data: { | ||
error, | ||
deleteLinks, | ||
loading: networkLoading, | ||
}, | ||
} = props; | ||
const errors = error && error.graphQLErrors && | ||
error.graphQLErrors.map((graphQLError) => graphQLError.message); | ||
|
||
// const types = readLinkTypes ? | ||
// readLinkTypes.reduce((accumulator, type) => ( | ||
// { ...accumulator, [type.key]: type } | ||
// ), {}) : | ||
// {}; | ||
|
||
return { | ||
loading: networkLoading, | ||
// types, | ||
graphQLErrors: errors, | ||
}; | ||
}, | ||
}; | ||
|
||
const { DELETE } = graphqlTemplates; | ||
const query = { | ||
apolloConfig, | ||
templateName: DELETE, | ||
pluralName: 'Links', | ||
pagination: false, | ||
params: { | ||
ids: '[ID]' | ||
}, | ||
args: { | ||
root: { | ||
ids: 'ids' | ||
} | ||
}, | ||
// fields: ['key', 'title', 'handlerName'], | ||
}; | ||
export default query; |
Oops, something went wrong.