Skip to content

Commit 434a531

Browse files
created a doc
1 parent 4a93c4b commit 434a531

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/lib/models/stack.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,16 @@ public function getEnvironment() {
156156
return $this->environment;
157157
}
158158

159+
/*
160+
* This call returns comprehensive information of all the content types available in a particular stack in your account.
161+
* @return Stack
162+
* */
159163
public function getContentTypes($params) {
160-
$myArray = json_decode($params, true);
161-
$this->_query = $myArray;
164+
if($params && $params !== "undefined") {
165+
$myArray = json_decode($params, true);
166+
$this->_query = $myArray;
167+
}
168+
162169
return \Contentstack\Utility\contentstackRequest($this, "getcontentTypes");
163170
}
164171
}

0 commit comments

Comments
 (0)