Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
  • Sign in / Register
N
ninja-forms
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
    • Locked Files
  • Issues 462
    • Issues 462
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 12
    • Merge Requests 12
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • _
  • Ninja Forms
  • ninja-forms
  • Merge Requests
  • !3707

Open
Opened Oct 04, 2018 by KR Moorhouse@Much2tall
  • Report abuse
Report abuse

Should make Ninja_Forms() API calls more fluid

Registered __call magic method in the model factory to allow passthrough of method calls without needing to call get() in the current api request chain.

In order to test this, you'll need to compare the results of various calls to the Ninja_Forms() object.

For example the following calls should now return identical results:

Ninja_Forms()->form( $id )->get()->get_settings()

Ninja_Forms()->form( $id )->get_settings()

This should also be true for calls to actions, fields, or subs.

So, the following calls should also return identical results:

Ninja_Forms()->form()->action( $id )->get()->get_settings()

Ninja_Forms()->form()->action( $id )->get_settings()

Edited Oct 22, 2018 by KR Moorhouse

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch origin
git checkout -b api-passthrough origin/api-passthrough

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git fetch origin
git checkout origin/develop
git merge --no-ff api-passthrough

Step 4. Push the result of the merge to GitLab

git push origin develop

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines.

  • Discussion 1
  • Commits 1
  • Pipelines 1
  • Changes 1
Assignee
No assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
0
Labels
None
Assign labels
  • View project labels
Reference: _/ninja-forms/ninja-forms!3707