-
-
Notifications
You must be signed in to change notification settings - Fork 825
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
Pcp api #9049
Pcp api #9049
Conversation
Can one of the admins verify this patch? |
*/ | ||
function civicrm_api3_pcp_create($params) { | ||
return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), | ||
$params, 'Pcp'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ggargani Not sure why you need 'Pcp' here and in the 3 relevant function below, you should be able to get away with $params on the one line with the rest, looks like i think your editor is tied to the 80char limit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ggargani I tested locally changing this to ``php
return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(FUNCTION), $params);
``
worked fine when i ran your unit test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I saw a couple of api and noticed that some of them uses the third parameter other ones not, so I was not sure about the best practise
$this->params = array ('title' => "Pcp title", | ||
// 'status_id' => 0, | ||
'contact_id' => 1, 'page_id' => 1, 'pcp_block_id' => 1); | ||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be removed, no need for debugging stuff in core
@ggargani I have just run the civilint from buildkit on your new files they report FILE: .../buildkit/build/47.demo/sites/all/modules/civicrm/api/v3/Pcp.phpFOUND 7 ERRORS AFFECTING 7 LINES40 | ERROR | [x] Whitespace found at end of line 89 | ERROR | [x] Expected 1 newline at end of file; 0 foundPHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLYFILE: ....demo/sites/all/modules/civicrm/tests/phpunit/api/v3/PcpTest.phpFOUND 21 ERRORS AFFECTING 16 LINES45 | ERROR | [x] Whitespace found at end of line | | line before itPHPCBF CAN FIX THE 21 MARKED SNIFF VIOLATIONS AUTOMATICALLYCan you fix up those style issues |
Fixe style issues
@totten @monishdeb Can either of you please ok to test this? |
jenkins, add to whitelist |
@seamuslee001 Wow, you were superfast :) I was still getting used with the release process (and overlooked the autoformatting from eclipse).
Also
|
nice 👍 We'll let the full civisuite run but i think this is pretty good :-) |
@eileenmcnaughton @totten @monishdeb Test failure is unrelated think we can merge this |
Wow huge effort guys - so many people have started on this api but somehow never completed it but finally you got it all the way!! |
Get, Create, Delete method added
Test included